:root{
  --bg:#ffffff;
  --card:#ffffff;
  --text:#111;
  --muted:#6b7280;
  --line:#ececf0;

  --suits-blue:#002dc2;
  --suits-purple:#9b03b6;
  --suits-pink:#e91e8c;
}

html{
  scrollbar-gutter: stable;
}

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:#f5f5f7;
  color:var(--text);
}

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 36px;
  height: 80px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.navbar-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.navbar-logo {
  height: 54px;
  width: auto;
  display: block;
}
.page-heading-bar {
  padding: 18px 36px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.page-heading {
  font-size: 22px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
  letter-spacing: -0.02em;
}
.navbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}
.navbar-modules {
  display: flex;
  background: #f5f5f7;
  padding: 6px;
  border-radius: 16px;
  gap: 12px;
}
.navbar-module-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 52px;
  border-radius: 14px;
  color: #86868b;
  text-decoration: none;
  transition: all 0.15s ease;
  gap: 2px;
}
.navbar-icon-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.85;
}
.navbar-module-icon:hover {
  background: #e8e8ed;
  color: #1d1d1f;
}
.navbar-module-icon.active {
  background: #ffffff;
  color: var(--suits-purple);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  position: relative;
}
.navbar-module-icon.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}
.navbar-module-icon.active[data-module="search"] { color: #1d4ed8; }
.navbar-module-icon.active[data-module="ai"] { color: #7c3aed; }
.navbar-module-icon.active[data-module="integrity"] { color: #e11d48; }
.navbar-module-icon.active[data-module="authority"] { color: #db2777; }
.navbar-module-icon.active[data-module="competitors"] { color: #ea580c; }
.navbar-module-icon.active[data-module="keyword_map"] { color: #ca8a04; }
.navbar-module-icon.active[data-module="actions"] { color: #059669; }
.navbar-module-icon.active[data-module="reporting"] { color: #1d1d1f; }
.navbar-module-icon.active[data-module="settings"] { color: #6b7280; }
.navbar-module-icon.active[data-module="home"] { color: #1d1d1f; }
.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.navbar-client-logo {
  height: 54px;
  max-width: 180px;
  display: block;
  border-radius: 4px;
  object-fit: contain;
}

.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.breadcrumb-link {
  color: var(--suits-purple, #9b03b6);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s;
}
.breadcrumb-link:hover {
  opacity: 0.8;
}
.breadcrumb-sep {
  opacity: 0.3;
  color: #86868b;
  flex-shrink: 0;
}
.breadcrumb-current {
  color: #86868b;
  font-weight: 500;
}

/* ── Page & Card ── */
.page{
  max-width:1300px;
  margin:20px auto;
  padding:0 20px;
}

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:26px 30px;
}

.sub-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 8px;
}
.sub-header-left {
  text-align: right;
}

.meta{
  text-align:right;
}

.meta-label{
  font-size:12px;
  color:var(--muted);
  margin-top:6px;
}

.meta-value{
  font-size:14px;
  font-weight:600;
}

.divider{
  border-top:1px solid var(--line);
  margin:18px 0 16px;
}

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

.topbar-label{
  font-size:12px;
  color:var(--muted);
}

.topbar-value{
  font-size:16px;
  font-weight:600;
}

.deviceToggle{
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:999px;
  overflow:hidden;
  background:#fff;
}

.deviceBtn{
  padding:8px 16px;
  border:0;
  background:#f5f5f7;
  font-weight:600;
  cursor:pointer;
}

.deviceBtn.is-active{
  background:#111;
  color:#fff;
}

.chartSection{
  margin-top:12px;
}

.chartTitle{
  font-size:14px;
  font-weight:600;
  margin:0 0 10px;
}

.chartWrap{
  height:190px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
}

#avgPosChart{
  width:100% !important;
  height:100% !important;
}

.kpis{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:16px;
  margin-top:18px;
  margin-bottom:18px;
}

.kpi{
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
}

.kpi-label{
  font-size:13px;
  color:var(--muted);
  margin-bottom:6px;
}

.kpi-value{
  font-size:28px;
  font-weight:700;
}

.tableWrap{
  margin-top:18px;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
}

.table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

.table thead{
  background:#f7f7f9;
  border-bottom:1px solid var(--line);
}

.table th{
  text-align:left;
  padding:13px 16px;
  font-size:11px;
  color:#86868b;
  font-weight:600;
  user-select:none;
  white-space:nowrap;
  letter-spacing:0.06em;
  text-transform:uppercase;
}

.table td{
  padding:14px 16px;
  border-top:1px solid var(--line);
  vertical-align:middle;
  background:#fff;
}

.table tbody tr{
  transition: background 0.1s ease;
}

.table tbody tr:hover td{
  background:#f8f7ff;
}

.empty{
  text-align:center;
  padding:26px !important;
  color:var(--muted);
}

/* Sorting arrows */
.th-sort{
  cursor:pointer;
  transition: color 0.15s ease;
}
.th-sort:hover{
  color:#1d1d1f;
}
.th-sort .sortIcon{
  display:inline-flex;
  flex-direction:column;
  gap:1px;
  margin-left:6px;
  vertical-align:middle;
  position:relative;
  top:-1px;
}
.th-sort .sortIcon::before{
  content:"";
  display:block;
  width:0;
  height:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-bottom:4px solid #d1d5db;
}
.th-sort .sortIcon::after{
  content:"";
  display:block;
  width:0;
  height:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:4px solid #d1d5db;
}
.th-sort.is-sorted-asc{ color:#1d1d1f; }
.th-sort.is-sorted-asc .sortIcon::before{ border-bottom-color:var(--suits-purple); }
.th-sort.is-sorted-desc{ color:#1d1d1f; }
.th-sort.is-sorted-desc .sortIcon::after{ border-top-color:var(--suits-purple); }

/* Position badges */
.pos-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:32px;
  padding:4px 10px;
  border-radius:8px;
  font-weight:700;
  font-size:14px;
  background:#f3f4f6;
  color:#374151;
}
.pos-badge.pos-top3{
  background:linear-gradient(135deg,#f0fdf4,#dcfce7);
  color:#059669;
  border:1px solid rgba(5,150,105,0.15);
}
.pos-badge.pos-top10{
  background:linear-gradient(135deg,#eff6ff,#dbeafe);
  color:var(--suits-blue);
  border:1px solid rgba(0,45,194,0.12);
}
.pos-badge.pos-top20{
  background:#fef9c3;
  color:#a16207;
  border:1px solid rgba(161,98,7,0.1);
}

/* Change badges */
.change-badge{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:4px 10px;
  border-radius:8px;
  font-weight:600;
  font-size:13px;
}
.change-badge.change-up{
  background:#f0fdf4;
  color:#059669;
}
.change-badge.change-down{
  background:#fef2f2;
  color:#dc2626;
}
.change-badge.change-flat{
  background:#f9fafb;
  color:#9ca3af;
}

/* Intent pills */
.intentPill{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border-radius:10px;
  font-weight:600;
  font-size:13px;
  line-height:1;
  border:1px solid rgba(17,17,17,0.06);
  white-space:nowrap;
}

/* Different shading so Navigation vs Commercial are distinct */
.intentPill--navigation{
  background:#f3e8ff;
  color:#9b03b6;
}
.intentPill--commercial{
  background:#e8eeff;
  color:#002dc2;
}
.intentPill--informational{
  background:#fde8f3;
  color:#c4167a;
}
.intentPill--transactional{
  background:#d1fae5;
  color:#059669;
}
.intentPill--branded{
  background:#f3e8ff;
  color:#7e22ce;
}
.intentPill--unknown,
.intentPill--other{
  background:#f3f4f6;
  color:#374151;
}

/* URL link + icon button */
.urlTd{ padding-right:10px; }
.urlCell{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:240px;
}
.urlLink{
  color:var(--suits-blue);
  text-decoration:none;
  font-weight:500;
  font-size:13px;
  flex:1;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.urlLink:hover{
  color:var(--suits-purple);
  text-decoration:underline;
  text-underline-offset:2px;
  text-decoration-thickness:1px;
}

.urlIconBtn{
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(0,45,194,0.15);
  border-radius:8px;
  color:var(--suits-blue);
  background:#f0f4ff;
  text-decoration:none;
  flex:0 0 auto;
  transition:all 0.15s ease;
}
.urlIconBtn:hover{
  background:var(--suits-blue);
  color:#fff;
  border-color:var(--suits-blue);
}
.urlIconBtn svg{ width:14px; height:14px; display:block; }

/* Tab navigation */
.tab-nav {
  display: flex;
  gap: 4px;
  background: #f5f5f7;
  padding: 4px;
  border-radius: 14px;
  margin: 16px 0 16px;
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 22px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #86868b;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.tab-btn:hover { color: #1d1d1f; background: #e8e8ed; }
.tab-btn.active {
  background: var(--suits-purple);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(155,3,182,0.18);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Stat boxes */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}
.stat-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}
.stat-box-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-box-value { font-size: 28px; font-weight: 700; color: var(--text); }
.stat-box-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Distribution grid */
.dist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0;
}
.dist-panel {
  background: #fafafa;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--line);
}
.dist-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.dist-panel .chartWrap {
  height: 220px;
  position: relative;
  border: none;
  padding: 0;
}

/* Movers grid */
.movers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0;
}
.movers-panel {
  background: #fafafa;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--line);
}
.movers-panel-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.movers-panel-title .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: var(--muted); }

.mover-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mover-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.mover-list li:last-child { border-bottom: none; }
.mover-kw { color: var(--text); flex: 1; }
.mover-change {
  font-weight: 700;
  font-size: 13px;
  min-width: 60px;
  text-align: right;
}
.mover-pos {
  color: var(--muted);
  font-size: 12px;
  min-width: 50px;
  text-align: right;
  margin-right: 8px;
}
.change-up { color: #059669; }
.change-down { color: #dc2626; }

/* Insights grid */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0;
}
.insight-panel {
  background: #fafafa;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--line);
}
.insight-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.insight-panel .chartWrap {
  height: 220px;
  position: relative;
  border: none;
  padding: 0;
}

.opp-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.opp-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.opp-list li:last-child { border-bottom: none; }
.opp-kw {
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.opp-meta { display: flex; gap: 12px; align-items: center; }
.opp-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #f3f4f6;
  color: var(--muted);
}

/* Actionable Insights Box */
.actionable-insights-box {
  background: linear-gradient(135deg, #faf5ff 0%, #f0f4ff 50%, #fdf2f8 100%);
  border: 1px solid rgba(155,3,182,0.12);
  border-radius: 16px;
  padding: 24px 28px;
  margin-top: 24px;
}
.actionable-insights-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--suits-purple);
  margin-bottom: 18px;
}
.actionable-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.actionable-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: #1d1d1f;
}
.actionable-list li .insight-bullet,
.aiList li .insight-bullet,
.insight-list li .insight-bullet {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.actionable-list li strong {
  color: var(--suits-purple);
  font-weight: 700;
}

/* Search bar */
.search-bar {
  margin: 16px 0 0;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  background: #fafafa;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.search-bar input:focus {
  border-color: #9b03b6;
  background: #fff;
}
.search-bar svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #86868b;
}

/* Color helpers */
.color-green { color: #059669; }
.color-red { color: #dc2626; }
.muted-text { color: var(--muted); }

/* Full-width distribution panel */
.dist-panel--full { margin-bottom: 20px; }

/* Opportunity sub-hints */
.opp-sub-hint { margin-top: 8px; }
.empty-state-sub { font-size: 12px; color: #aeaeb2; }

/* SERP Features Section */
.serp-features-section {
  margin-top: 28px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.serp-features-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.serp-features-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--suits-purple);
}
.serp-edu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.serp-edu-toggle:hover {
  color: var(--suits-purple);
  border-color: rgba(155,3,182,0.25);
}
.serp-edu-panel {
  background: linear-gradient(135deg, #faf5ff 0%, #f0f4ff 50%, #fdf2f8 100%);
  border: 1px solid rgba(155,3,182,0.12);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: #1d1d1f;
}
.serp-edu-panel p {
  margin: 0 0 12px;
}
.serp-edu-panel ul {
  margin: 0;
  padding-left: 18px;
}
.serp-edu-panel li {
  margin-bottom: 6px;
}
.serp-edu-panel li strong {
  color: var(--suits-purple);
}
.serp-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.serp-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
}
.serp-summary-chip .serp-chip-label {
  font-weight: 600;
}
.serp-summary-chip .serp-chip-count {
  color: var(--muted);
  font-size: 12px;
}
.serp-summary-chip .serp-chip-owned {
  color: #059669;
  font-weight: 600;
  font-size: 12px;
}
.serp-feature-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  margin: 2px 3px;
}
.serp-feature-badge--owned {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.serp-feature-badge--not-owned {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
.serp-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  margin: 2px 3px;
}
.serp-check--yes {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.serp-check--no {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #d1d5db;
}
.serp-features-section .tableWrap {
  margin-top: 0;
}
.serp-features-empty {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 900px) {
  .navbar { padding: 0 16px; gap: 8px; }
  .navbar-logo { height: 28px; }
  .page-heading-bar { padding: 14px 16px 10px; }
  .page-heading { font-size: 18px; }
}
.insights-action-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 50%, #f0f4ff 100%);
  border: 1px solid rgba(37,99,235,0.12);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 20px;
}
.insights-action-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 10px;
}
.insights-action-banner p {
  font-size: 14px;
  line-height: 1.6;
  color: #1e3a5f;
  margin: 0;
}
.insights-action-banner a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.insights-action-banner a:hover {
  color: #1d4ed8;
}

#issueGroupsContainer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}
.issue-group-card {
  background: var(--card, #1a1a2e);
  border-radius: 12px;
  padding: 16px 20px;
}
.issue-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}
.issue-group-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.issue-group-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.issue-group-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  white-space: nowrap;
}
.issue-group-count {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.issue-group-chevron {
  flex-shrink: 0;
  color: var(--muted, #94a3b8);
  transition: transform 0.2s;
}
.issue-group-card.is-open .issue-group-chevron {
  transform: rotate(180deg);
}
.issue-group-tip {
  font-size: 12px;
  color: var(--muted, #94a3b8);
  margin: 6px 0 0 26px;
  line-height: 1.5;
}
.issue-group-pages {
  display: none;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.issue-group-card.is-open .issue-group-pages {
  display: flex;
}
.issue-page-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0 7px 26px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}
.issue-page-row:last-child {
  border-bottom: none;
}
.issue-page-url {
  color: var(--accent, #2563eb);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
  flex-shrink: 0;
}
.issue-page-url:hover {
  text-decoration: underline;
}
.issue-page-title {
  color: var(--muted, #94a3b8);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.issue-page-extra {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.issue-group-healthy {
  border-left: 4px solid #16a34a;
}

.date-range-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.date-range-bar .dr-preset {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.date-range-bar .dr-preset:hover {
  border-color: #bbb;
}
.date-range-bar .dr-preset.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}
.date-range-bar .dr-custom-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.date-range-bar .dr-date-input {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  width: 120px;
}
.date-range-bar .dr-date-input:focus {
  outline: none;
  border-color: #9b03b6;
}
.date-range-bar .dr-sep {
  font-size: 11px;
  color: var(--muted);
}
.date-range-bar .dr-apply {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #111;
  border-radius: 8px;
  background: #111;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s;
}
.date-range-bar .dr-apply:hover {
  opacity: 0.85;
}

.domain-traffic-section {
  margin: 32px 0 24px 0;
}
.domain-traffic-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 14px;
}
.domain-traffic-stats {
  margin-top: 0;
}
.domain-traffic-highlight {
  background: linear-gradient(135deg, #f5f0ff 0%, #ede9fe 100%);
  border-color: var(--suits-purple, #7c3aed) !important;
}
.domain-value-big {
  font-size: 32px;
  color: var(--suits-purple, #7c3aed) !important;
}
.domain-untracked-panel {
  background: #fafafa;
}
.insight-panel-sub {
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 14px 0;
}
.domain-untracked-table-wrap {
  overflow-x: auto;
}
.domain-untracked-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.domain-untracked-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
}
.domain-untracked-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.domain-untracked-table tr:last-child td {
  border-bottom: none;
}
.domain-untracked-table .kw-col {
  font-weight: 500;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.domain-untracked-table .url-col {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.domain-untracked-table .pos-col {
  font-weight: 600;
  text-align: center;
}
.domain-untracked-table .value-col {
  font-weight: 600;
  color: var(--suits-purple, #7c3aed);
}
.domain-tracked-highlight {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #059669 !important;
}
.domain-tracked-highlight .stat-box-value {
  color: #059669;
}
.track-kw-btn {
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--suits-purple, #7c3aed);
  color: var(--suits-purple, #7c3aed);
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.track-kw-btn:hover:not(:disabled) {
  background: var(--suits-purple, #7c3aed);
  color: #fff;
}
.track-kw-btn:disabled {
  cursor: default;
  opacity: 0.7;
}
.track-kw-btn.tracked {
  border-color: #059669;
  color: #059669;
  background: #f0fdf4;
}
.dismiss-kw-btn {
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #9ca3af;
  color: #6b7280;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  margin-left: 6px;
}
.dismiss-kw-btn:hover:not(:disabled) {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}
.dismiss-kw-btn:disabled {
  cursor: default;
  opacity: 0.7;
}
.domain-value-change-up { color: #059669; }
.domain-value-change-down { color: #dc2626; }

@media (max-width: 768px) {
  .dist-grid, .movers-grid, .insights-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .tab-nav { gap: 2px; }
  .tab-btn { padding: 8px 14px; font-size: 12px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .issue-page-url { max-width: 180px; }
  .issue-page-row { gap: 8px; padding-left: 10px; }
  .date-range-bar { gap: 4px; }
  .date-range-bar .dr-preset { padding: 4px 10px; font-size: 11px; }
  .date-range-bar .dr-date-input { width: 100px; font-size: 11px; }
}
