/* DASHBOARD LAYOUT */

body {
  display: flex;
  flex-direction: column;
}
div#footer-placeholder { margin-top: auto; }

.dash-layout {
  display: flex;
  min-height: calc(100vh - 64px);
  padding-top: 64px;
  width: 100%;
  margin: 0;
  max-width: none;
}

/* SIDEBAR SCROLLBAR */

.dash-sidebar::-webkit-scrollbar {
  width: 4px;
}
.dash-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.dash-sidebar::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}
.dash-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--blue-mid);
}

/* SIDEBAR*/

.dash-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  z-index: 10;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.sidebar-section {
  padding: 0 0.75rem;
  margin-bottom: 0.25rem;
}

.sidebar-count-danger {
  background: #fce8e8;
  color: var(--danger);
}

.sidebar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.5rem 0.75rem 0.4rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  background: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--ink3);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}

.sidebar-item:hover { background: var(--bg2); color: var(--ink); }

.sidebar-item.active {
  background: var(--bg2);
  color: var(--blue-dark);
  font-weight: 600;
}

.sidebar-item.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.sidebar-item svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}

.sidebar-count {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  background: var(--bg);
  border-radius: 10px;
  padding: 1px 7px;
  color: var(--muted);
}

.sidebar-badge {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fef3cd;
  color: #856404;
  border-radius: 6px;
  padding: 2px 6px;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.6rem 1rem;
}

/* SIDEBAR FAVORITES */

.sidebar-favorites {
  display: flex;
  flex-direction: column;
}

.sidebar-empty-fav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.sidebar-empty-fav svg {
  width: 14px;
  height: 14px;
  stroke: var(--muted);
  opacity: 0.5;
}

.sidebar-fav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: none;
  background: none;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink3);
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}
.sidebar-fav-item:hover { background: var(--bg2); }
.sidebar-fav-item.active { background: var(--bg2); color: var(--blue-dark); font-weight: 500; }

.sidebar-fav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-domain-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0;
}

.sidebar-domain-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.5rem 0.75rem 0.4rem;
}

.sidebar-fav-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.sidebar-domain-block .sidebar-filter-toggle {
  padding: 0.5rem 0.75rem;
}

.sidebar-domain-block .sidebar-no-domain-link {
  padding: 0 0.75rem 0.25rem;
}

/* MOBILE SIDEBAR TOGGLE */

.dash-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-dark);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  align-items: center;
  justify-content: center;
}
.dash-sidebar-toggle svg { width: 20px; height: 20px; stroke: #fff; }

/* MAIN CONTENT */

.dash-main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 2rem 4rem;
  /*max-width: 900px;*/;
}

.dash-view { animation: dashFadeIn 0.2s ease; }
@keyframes dashFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* HEADER */

.dash-main-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.dash-main-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.dash-main-subtitle {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-run-scan {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--blue-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-run-scan:hover { background: var(--blue-deepest); }
.btn-run-scan svg { width: 15px; height: 15px; stroke: #fff; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--blue-dark);
  padding: 0;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}
.btn-back:hover { color: var(--blue-deepest); }
.btn-back svg { width: 14px; height: 14px; stroke: currentColor; }

.btn-favorite {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-favorite:hover { background: var(--bg2); }
.btn-favorite svg { width: 16px; height: 16px; stroke: var(--muted); transition: stroke 0.15s, fill 0.15s; }
.btn-favorite.is-fav svg { stroke: #c8892a; fill: #c8892a; }

.btn-clear-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 0.5rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--danger);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-clear-all:hover { background: #fef2f2; border-color: var(--danger); }
.btn-clear-all svg { width: 14px; height: 14px; stroke: var(--danger); }

/* STATS CARDS */

.dash-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.dash-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

.dash-stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.75rem;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.dash-stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* CHART */

.dash-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.dash-chart-header {
  padding: 1rem 1.25rem 0;
}

.dash-chart-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.dash-chart-body {
  padding: 0.75rem 1.25rem 1rem;
}

.dash-chart-body canvas {
  width: 100% !important;
  max-height: 160px;
}

/* SECTION HEADERS */

.dash-section-header {
  margin-bottom: 0.75rem;
}

.dash-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

/* DOMAIN CARDS GRID */

.dash-domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.dash-domain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.dash-domain-card:hover {
  border-color: var(--blue-mid);
  box-shadow: 0 4px 20px rgba(0,119,182,0.12);
}

.dash-domain-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.dash-domain-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-domain-icon svg { width: 14px; height: 14px; stroke: var(--blue-dark); }

.dash-domain-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--ink2);
  word-break: break-all;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.dash-domain-fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  color: var(--muted);
  transition: color 0.15s;
  flex-shrink: 0;
}
.dash-domain-fav-btn:hover { color: #c8892a; }
.dash-domain-fav-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.dash-domain-fav-btn.is-fav svg { stroke: #c8892a; fill: #c8892a; }

.dash-domain-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.dash-domain-stats .score-pill {
  margin-left: 0;
  margin-top: 0.5rem;
  align-self: flex-start;
  flex-basis: 100%;
}

/* CLICKABLE STAT */
.dash-stat-card.clickable {
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dash-stat-card.clickable:hover {
  border-color: var(--danger);
  box-shadow: 0 4px 20px rgba(184,50,50,0.1);
}

/* ATTENTION LIST */
.dash-attention-list {
  margin-bottom: 1.5rem;
  animation: dashFadeIn 0.2s ease;
}

.dash-domain-stat-item {
  display: flex;
  flex-direction: column;
}

.dash-domain-stat-val {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  line-height: 1;
}

.dash-domain-stat-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* Score range pill */

.score-pill {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  align-self: center;
}
.score-pill.excellent { background: #e0f4fa; color: #0077b6; }
.score-pill.good      { background: #e0f4fa; color: #0077b6; }
.score-pill.needs-work{ background: #fef3cd; color: #856404; }
.score-pill.poor      { background: #fce8e8; color: #b83232; }

/* TABLE */

.dash-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-bottom: 2rem;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
}

.dash-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  white-space: nowrap;
}
.dash-table th:not(:first-child) { text-align: center; }

.dash-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--bg); }

.dash-table .td-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--blue-dark);
  word-break: break-all;
}
.dash-table .td-score {
  text-align: center;
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
}
.dash-table .td-pillar {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink3);
}
.dash-table .td-date {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.dash-table .td-actions {
  text-align: center;
  white-space: nowrap;
}
.dash-table .td-actions a,
.dash-table .td-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.dash-table .td-actions a:hover,
.dash-table .td-actions button:hover { background: var(--bg2); color: var(--blue-dark); }
.dash-table .td-actions svg { width: 14px; height: 14px; stroke: currentColor; }

/* EMPTY STATE */

.dash-empty {
  text-align: center;
  padding: 4rem 2rem;
}
.dash-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  background: var(--bg2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-empty-icon svg { width: 24px; height: 24px; stroke: var(--muted); }
.dash-empty-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.dash-empty-desc {
  font-size: 0.9rem;
  color: var(--ink3);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* HISTORY VIEW (reuse existing patterns) */

#viewHistory .url-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

#viewHistory .url-chart-inner canvas {
  width: 100% !important;
  max-height: 130px;
}

#viewHistory .url-chart-wrap.open .url-chart-inner {
  height: 200px;
  overflow: hidden;
}

#viewHistory .url-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}
#viewHistory .url-group-header:hover .url-group-url { opacity: 0.75; }

#viewHistory .url-group-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

#viewHistory .url-group-icon {
  width: 30px;
  height: 30px;
  background: var(--bg2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#viewHistory .url-group-icon svg { width: 14px; height: 14px; stroke: var(--blue-dark); }

#viewHistory .url-group-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink2);
  word-break: break-all;
}

#viewHistory .url-group-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

#viewHistory .url-group-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
}

#viewHistory .btn-delete-url {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
#viewHistory .btn-delete-url:hover { color: var(--danger); }
#viewHistory .btn-delete-url svg { width: 14px; height: 14px; stroke: currentColor; }

#viewHistory .accordion-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,119,182,0.08);
  color: #0077b6;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
#viewHistory .url-group.open .accordion-chevron { transform: rotate(180deg); }

#viewHistory .accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
  overflow: hidden;
}
#viewHistory .url-group.open .accordion-body { grid-template-rows: 1fr; }
#viewHistory .accordion-inner {
  min-height: 0;
  overflow-x: auto;
}

#viewHistory .entries-table {
  width: 100%;
  border-collapse: collapse;
}
#viewHistory .entries-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.6rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
#viewHistory .entries-table th:not(:first-child) { text-align: center; }
#viewHistory .entries-table td {
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
#viewHistory .entries-table tr:last-child td { border-bottom: none; }
#viewHistory .entries-table tr:hover td { background: var(--bg); }

#viewHistory .entry-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: var(--ink3);
}
#viewHistory .entry-score {
  text-align: center;
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
}
#viewHistory .entry-pillar { text-align: center; font-size: 0.82rem; color: var(--ink3); }
#viewHistory .entry-delta { text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; font-weight: 600; }

.delta-up   { color: var(--blue-mid); }
.delta-down { color: var(--danger); }
.delta-same { color: var(--muted); }

#viewHistory .url-path-cell {
  padding: 8px 12px 4px !important;
  border-top: 1px solid rgba(0,119,182,0.12);
}
#viewHistory .url-path-row:first-child .url-path-cell { border-top: none; }
#viewHistory .url-path-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#viewHistory .url-path-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
#viewHistory .entry-url-btn {
  background: none; border: none; padding: 0;
  cursor: pointer; text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #0077b6;
  word-break: break-all;
  transition: color 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
#viewHistory .entry-url-btn:hover { color: #03045e; }
#viewHistory .entry-url-btn.active { color: #03045e; font-weight: 600; }

#viewHistory .url-trend-icon { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.5; }
#viewHistory .entry-url-btn:hover .url-trend-icon,
#viewHistory .entry-url-btn.active .url-trend-icon { opacity: 1; }

#viewHistory .btn-analyze-again,
#viewHistory .btn-view-report {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--blue-dark);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
#viewHistory .btn-analyze-again:hover,
#viewHistory .btn-view-report:hover { background: var(--blue-deepest); }
#viewHistory .btn-analyze-again svg,
#viewHistory .btn-view-report svg { width: 12px; height: 12px; stroke: #fff; }

#viewHistory .btn-delete-entry {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  color: var(--muted);
  transition: color 0.2s;
}
#viewHistory .btn-delete-entry:hover { color: var(--danger); }
#viewHistory .btn-delete-entry svg { width: 13px; height: 13px; stroke: currentColor; }

#viewHistory .url-chart-row td { padding: 0 !important; background: #f4fafd; }
#viewHistory .url-chart-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
  overflow: hidden;
}
#viewHistory .url-chart-wrap.open { grid-template-rows: 1fr; }
#viewHistory .url-chart-inner { min-height: 0; padding: 0 16px; }
#viewHistory .url-chart-wrap.open .url-chart-inner { padding: 12px 16px; }
#viewHistory .url-chart-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a8fa8;
  margin-bottom: 8px;
}

#viewHistory .url-data-row td { padding-top: 4px !important; padding-bottom: 4px !important; }

/* INSIGHT CARDS */

.dash-insights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.dash-insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}

.dash-insight-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.dash-insight-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-insight-icon svg { width: 14px; height: 14px; stroke: currentColor; }
.dash-insight-icon.green  { background: #e0f4fa; color: #0077b6; }
.dash-insight-icon.amber  { background: #fef3cd; color: #856404; }
.dash-insight-icon.blue   { background: #e0f4fa; color: #0077b6; }

.dash-insight-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.dash-insight-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 0.2rem;
  word-break: break-all;
}

.dash-insight-detail {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

/* =============================================
   SETTINGS
   ============================================= */

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem 0;
}

.settings-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-card-icon svg { width: 16px; height: 16px; stroke: var(--blue-dark); }
.settings-card-icon.danger { background: #fce8e8; }
.settings-card-icon.danger svg { stroke: var(--danger); }

.settings-card-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.settings-card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.settings-card-body {
  padding: 1rem 1.25rem 1.25rem;
}

/* Threshold slider */

.settings-threshold {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.settings-threshold input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border2);
  border-radius: 3px;
  outline: none;
}

.settings-threshold input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue-dark);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(3,4,94,0.2);
}

.settings-threshold input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue-dark);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(3,4,94,0.2);
}

.settings-threshold-val {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--ink);
  min-width: 36px;
  text-align: center;
}

.settings-threshold-labels {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* Radio group */

.settings-radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.settings-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.settings-radio:hover { border-color: var(--blue-mid); background: var(--bg); }
.settings-radio:has(input:checked) { border-color: var(--blue-dark); background: var(--bg2); }
.settings-radio:has(input:disabled) { opacity: 0.5; cursor: default; }

.settings-radio input { display: none; }

.settings-radio-box {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.settings-radio input:checked + .settings-radio-box {
  border-color: var(--blue-dark);
}
.settings-radio input:checked + .settings-radio-box::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-dark);
}

.settings-radio-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--ink);
}

.settings-coming {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fef3cd;
  color: #856404;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Buttons */

.settings-data-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-settings {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--blue-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-settings:hover { background: var(--blue-deepest); }
.btn-settings svg { width: 15px; height: 15px; stroke: currentColor; }

.btn-settings-outline {
  background: var(--surface);
  color: var(--blue-dark);
  border: 1px solid var(--border2);
}
.btn-settings-outline:hover { background: var(--bg2); }

.btn-settings-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--border2);
}
.btn-settings-danger:hover { background: #fef2f2; border-color: var(--danger); }

.settings-import-msg {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  line-height: 1.5;
}
.settings-import-msg.success { color: #0077b6; }
.settings-import-msg.error { color: var(--danger); }

/* FIX ISSUES */

.fix-pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.fix-pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fix-pillar-card:hover {
  border-color: var(--blue-mid);
  box-shadow: 0 4px 20px rgba(0,119,182,0.12);
}

.fix-pillar-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.fix-pillar-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fix-pillar-icon svg { width: 16px; height: 16px; stroke: var(--blue-dark); }
.fix-pillar-icon.large { width: 40px; height: 40px; }
.fix-pillar-icon.large svg { width: 20px; height: 20px; }

.fix-pillar-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.fix-pillar-weight {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

.fix-pillar-card-stats {
  display: flex;
  gap: 1.5rem;
}

.fix-pillar-stat {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.fix-pillar-stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--ink);
  line-height: 1;
}

.fix-pillar-stat-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fix-pillar-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  background: var(--bg2);
  color: var(--ink3);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.fix-pillar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.td-issue-label {
  font-size: 0.82rem;
  color: var(--ink);
  word-break: break-word;
}

.td-pillar-tag {
  text-align: center;
}

/* Domain groups in pillar drill-down */

.fix-domain-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}

.fix-domain-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--ink2);
}
.fix-domain-header svg { width: 14px; height: 14px; stroke: var(--blue-dark); }

.fix-domain-name { flex: 1; word-break: break-all; }

.fix-domain-count {
  font-size: 0.7rem;
  color: var(--muted);
  flex-shrink: 0;
}

.fix-page-block {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}
.fix-page-block:last-child { border-bottom: none; }

.fix-page-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.fix-page-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--blue-dark);
  word-break: break-all;
}

.fix-page-score {
  font-family: 'DM Serif Display', serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.fix-page-potential {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #0077b6;
  background: #e0f4fa;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: auto;
}

.fix-checks-list {
  margin-bottom: 0.5rem;
}

.fix-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--ink3);
}

.fix-check-icon {
  flex-shrink: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.fix-check-label {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

.fix-check-pts {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #0077b6;
  font-weight: 500;
  flex-shrink: 0;
}

.fix-page-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.4rem;
}

.fix-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue-dark);
  text-decoration: none;
  transition: color 0.15s;
}
.fix-action-link:hover { color: var(--blue-deepest); }
.fix-action-link svg { width: 13px; height: 13px; stroke: currentColor; }

@media (max-width: 600px) {
  .fix-pillar-grid { grid-template-columns: 1fr; }
}

/* SEARCH BAR */

.dash-search-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}
.dash-search-bar:focus-within { border-color: var(--blue-mid); }
.dash-search-bar svg { width: 16px; height: 16px; stroke: var(--muted); flex-shrink: 0; }

.dash-search-bar input {
  border: none;
  outline: none;
  background: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--ink);
  width: 100%;
}
.dash-search-bar input::placeholder { color: var(--muted); }

/* QUICK WINS */

.quick-wins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.quick-win-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-win-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.quick-win-pts {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: #0077b6;
  line-height: 1;
}

.quick-win-label {
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
}

.quick-win-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
}

.quick-win-effort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #0077b6;
  background: #e0f4fa;
  padding: 2px 8px;
  border-radius: 6px;
}
.quick-win-effort svg { width: 11px; height: 11px; stroke: currentColor; }

.quick-win-urls {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .quick-wins-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .quick-wins-grid { grid-template-columns: 1fr; }
}

/* QUICK WIN DETAIL */

.quick-win-card {
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.quick-win-card:hover {
  border-color: var(--blue-mid);
  box-shadow: 0 4px 20px rgba(0,119,182,0.12);
}

.qw-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.qw-detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e0f4fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qw-detail-icon svg { width: 20px; height: 20px; stroke: #0077b6; }

.qw-detail-label {
  font-size: 0.88rem;
  color: var(--ink3);
  margin: 0.25rem 0 0.4rem;
  line-height: 1.4;
}

.qw-detail-stats {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.qw-detail-stat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink3);
}
.qw-detail-stat strong {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
}

/* MY DOMAIN FILTER */

.settings-domain-select select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.settings-domain-select select:focus { border-color: var(--blue-mid); }

/* Sidebar filter toggle */

.sidebar-filter-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0 0.75rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  user-select: none;
}
/* .sidebar-filter-toggle:hover { background: var(--bg2); } */

.sidebar-filter-toggle input { display: none; }

.sidebar-filter-check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid var(--border2);
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.sidebar-filter-toggle input:checked + .sidebar-filter-check {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}
.sidebar-filter-toggle input:checked + .sidebar-filter-check::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sidebar-filter-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--ink3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-filter-label strong {
  color: var(--blue-dark);
  font-weight: 600;
}

.sidebar-no-domain {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.75rem;
}
.sidebar-no-domain span {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.76rem;
  color: var(--muted);
}
.sidebar-no-domain-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--blue-dark);
  padding: 0;
  text-align: left;
  transition: color 0.15s;
}
.sidebar-no-domain-link:hover { color: var(--blue-deepest); }

/* COMPETITORS */

/* Selector card */

.comp-selector-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.comp-selector-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.comp-selector-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.comp-selector-icon svg { width: 16px; height: 16px; stroke: var(--blue-dark); }

.comp-selector-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.comp-selector-desc {
  font-size: 0.78rem;
  color: var(--muted);
}
.comp-selector-desc strong { color: var(--blue-dark); }

.comp-selector-body {
  padding: 1rem 1.25rem;
}

.comp-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comp-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.comp-checkbox:hover { border-color: var(--blue-mid); background: var(--bg); }
.comp-checkbox:has(input:checked) { border-color: var(--blue-dark); background: var(--bg2); }

.comp-checkbox input { display: none; }

.comp-checkbox-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid var(--border2);
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.comp-checkbox input:checked + .comp-checkbox-box {
  background: var(--comp-color);
  border-color: var(--comp-color);
}
.comp-checkbox input:checked + .comp-checkbox-box::after {
  content: '';
  position: absolute;
  top: 0px;
  left: 3px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.comp-checkbox-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink2);
}

/* Empty hint */

.comp-empty-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.comp-empty-hint svg { width: 16px; height: 16px; stroke: var(--muted); }

/* Comparison table */

.comp-table .td-path .comp-dot,
.comp-table .td-path .comp-you-badge {
  display: inline-block;
  vertical-align: middle;
}
.comp-table .td-path .comp-dot {
  margin-right: 0.4rem;
}
.comp-table .td-path .comp-you-badge {
  margin-left: 0.4rem;
}

.comp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comp-you-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #e0f4fa;
  color: #0077b6;
  padding: 1px 6px;
  border-radius: 4px;
}

.comp-row-mine {
  background: rgba(0,119,182,0.03);
}
.comp-row-mine td { font-weight: 500; }

/* Pillar comparison bars */

.comp-pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.comp-pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.comp-pillar-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.comp-pillar-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comp-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comp-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  width: 90px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comp-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg2);
  border-radius: 4px;
  overflow: hidden;
}

.comp-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.comp-bar-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink);
  font-weight: 500;
  min-width: 24px;
  text-align: right;
}

/* Top pages grid */

.comp-pages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.comp-no-data {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 1rem;
  text-align: center;
}

/* SIDEBAR USER */

.sidebar-user-logged-in {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
}

.sidebar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 0.9rem;
  color: var(--blue-dark);
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-email {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #0077b6;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sidebar-user-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0077b6;
}

.sidebar-user-logout {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--muted);
  transition: color 0.15s;
  flex-shrink: 0;
}
.sidebar-user-logout:hover { color: var(--danger); }
.sidebar-user-logout svg { width: 14px; height: 14px; stroke: currentColor; }

.sidebar-user-guest {
  padding: 0.5rem 0.75rem;
}

.sidebar-user-signin {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--blue-dark);
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.sidebar-user-signin:hover { background: var(--bg2); border-color: var(--blue-mid); }
.sidebar-user-signin svg { width: 15px; height: 15px; stroke: currentColor; }

/* FIX & GENERATE BUTTONS */

.fix-check-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}

.fix-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.fix-action-btn svg { flex-shrink: 0; }

.fix-btn {
  background: rgba(0,119,182,0.08);
  color: #0077b6;
}
.fix-btn:hover {
  background: rgba(0,119,182,0.18);
  color: #03045e;
}

.generate-btn {
  background: rgba(200,137,42,0.08);
  color: #c8892a;
}
.generate-btn:hover {
  background: rgba(200,137,42,0.18);
  color: #8b5e14;
}

/* REPORTS */

.report-range-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.report-range-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.report-range-btns {
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}

.report-range-btn {
  padding: 0.4rem 0.85rem;
  border: none;
  border-radius: 6px;
  background: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink3);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.report-range-btn:hover { background: var(--bg2); }
.report-range-btn.active {
  background: var(--blue-dark);
  color: #fff;
}

.btn-export-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  background: var(--blue-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-export-pdf:hover { background: var(--blue-deepest); }
.btn-export-pdf:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-export-pdf svg { width: 15px; height: 15px; stroke: currentColor; }

/* Executive Summary */

.report-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.report-summary-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.report-summary-text {
  font-size: 0.88rem;
  color: var(--ink3);
  line-height: 1.7;
}
.report-summary-text strong { color: var(--ink); }

/* Charts Row */

.report-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.report-chart-half {
  min-height: 0;
}

/* Severity Tags */

.report-severity-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.severity-critical { background: #fce8e8; color: #b83232; }
.severity-high     { background: #fef3cd; color: #856404; }
.severity-medium   { background: #e0f4fa; color: #0077b6; }
.severity-low      { background: #f0f9fc; color: #5a8fa8; }

@media (max-width: 768px) {
  .report-charts-row { grid-template-columns: 1fr; }
  .report-range-bar { flex-direction: column; align-items: flex-start; }
  .btn-export-pdf { margin-left: 0; }
}

/* AGENT READINESS */

.agent-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.agent-filter-label {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.agent-domain-select {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.agent-entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.agent-entry-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 1rem;
  padding: 1rem 1.25rem 0.75rem;
  align-items: center;
}

.agent-entry-meta { grid-column: 1; }

.agent-entry-domain {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.agent-entry-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
}

.agent-entry-score {
  grid-column: 2;
  grid-row: 1 / 3;
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  line-height: 1;
  text-align: right;
}

.agent-entry-score-max {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  opacity: 0.5;
  font-weight: 400;
}

.agent-entry-bar-wrap {
  grid-column: 1;
  height: 4px;
  background: var(--bg2);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.agent-entry-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s ease;
}

.agent-checks-list {
  border-top: 1px solid var(--bg2);
  padding: 0.5rem 0;
}

.agent-check-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.83rem;
}

.agent-check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.agent-check-icon.pos { background: #e0f8f0; color: #1a7a4a; }
.agent-check-icon.neg { background: #fde8e8; color: var(--danger); }
.agent-check-icon.neu { background: var(--bg2); color: var(--muted); }

.agent-check-label { flex: 1; color: var(--ink3); }

.agent-fix-btn {
  flex-shrink: 0;
  background: rgba(204,120,92,0.08);
  border: 1px solid rgba(204,120,92,0.25);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.65rem;
  color: #cc785c;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  transition: background 0.15s;
}
.agent-fix-btn:hover { background: rgba(204,120,92,0.15); }

.agent-done-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 600;
  color: #1a7a4a;
  background: #e0f8f0;
  padding: 2px 8px;
  border-radius: 6px;
}

.agent-entry-footer {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  border-top: 1px solid var(--bg2);
}

.agent-report-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink2);
  text-decoration: none;
}
.agent-report-link:hover { text-decoration: underline; }

.agent-no-results {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 1rem 0;
}

/* Responsive */

@media (max-width: 768px) {
  .comp-pillar-grid { grid-template-columns: 1fr; }
  .comp-pages-grid { grid-template-columns: 1fr; }
  .comp-bar-label { width: 70px; }
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-table th:nth-child(n+4),
  .dash-table td:nth-child(n+4) { display: none; }
  .dash-table th:last-child,
  .dash-table td:last-child { display: table-cell; }
  .dash-insights { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .dash-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    box-shadow: none;
  }
  .dash-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .dash-sidebar-toggle { display: flex; }
  .dash-main { padding: 1.25rem 1.25rem 4rem; }
  .dash-main-header { flex-direction: column; align-items: flex-start; }

  #viewHistory .entries-table th:nth-child(n+4),
  #viewHistory .entries-table td:nth-child(n+4) { display: none; }
  #viewHistory .entries-table th:last-child,
  #viewHistory .entries-table td:last-child { display: table-cell; }
}

@media (max-width: 480px) {
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-domain-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
}
