/* ==========================================================================
   TOP BAR: Disclaimer + Controls + Search + Phase Progress
   ========================================================================== */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 150;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  margin-left: var(--sidebar-w);
  padding: 10px 24px;
}

/* Legal disclaimer banner */
.disclaimer {
  background: var(--clr-objection-bg);
  border: 1px solid rgba(252,165,165,0.3);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--clr-objection);
  margin-bottom: 10px;
  line-height: 1.5;
  text-align: center;
}

/* Controls row */
.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

/* Toggle buttons (Criminal/Civil, Dark/Light) */
.toggle-group {
  display: inline-flex;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 0.8rem;
}
.toggle-group button {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.toggle-group button.active {
  background: var(--accent);
  color: var(--bg);
}

/* Role selector */
.role-select {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.role-select:focus { outline: 2px solid var(--accent); }

/* Jurisdiction selector */
.jurisdiction-select {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.jurisdiction-select:focus { outline: 2px solid var(--accent); }

/* Search bar */
.search-bar {
  flex: 1;
  min-width: 180px;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 7px 14px 7px 36px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
}
.search-bar input:focus { outline: 2px solid var(--accent); }
.search-bar::before {
  content: '\1F50D';
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
}
.search-bar .clear-search {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  display: none;
}

/* Phase progress bar */
.phase-progress {
  display: flex;
  gap: 4px;
}
.phase-progress button {
  flex: 1;
  padding: 6px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.phase-progress button:hover { border-color: var(--accent); color: var(--accent); }
.phase-progress button.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
