/* workspace.css — the shared "case workspace" chrome (header panel, stale
   alert, tab nav, shared network filter) used on every page except the
   full-screen /screen route. Structure follows the Investigation
   Platform's CaseWorkspace; tokens/visuals are our own (see base.css). */

.ws-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card-gradient);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.ws-header__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.ws-eyebrow {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}
.ws-title {
  margin: 0.4rem 0 0;
  font-size: 1.5rem;
  font-weight: 600;
  word-break: break-word;
}
.ws-mono-id {
  margin: 0.5rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  word-break: break-all;
}
.ws-meta {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--fg-muted);
}
.ws-meta--emphasis {
  font-weight: 600;
  color: var(--fg);
}
.ws-refresh { align-self: flex-start; white-space: nowrap; }

.ws-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.75rem;
}
.ws-chip {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  color: var(--fg-muted);
}
.ws-chip--stale {
  border-color: var(--warn);
  color: var(--warn);
  background: var(--warn-muted);
}

.ws-alert {
  margin-top: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--warn);
  background: var(--warn-muted);
  color: var(--warn);
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
}

/* The whole bar (tabs + the War room link) scrolls together as one unit on
   narrow screens, so there's a single, predictable scroll affordance and
   War room is always reachable by continuing the same swipe -- rather than
   pinning War room outside the scroll area, which on a narrow viewport left
   almost no room for the tab list and clipped tab labels mid-word. On wide
   screens nothing overflows, so `margin-left: auto` on the War room link
   still pushes it to the far right of the bar. */
.ws-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-top: 1.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.ws-tabs__list {
  display: flex;
  gap: 0.1rem;
  flex-shrink: 0;
}
.ws-tab {
  flex-shrink: 0;
  border-bottom: 2px solid transparent;
  padding: 0.7rem 0.9rem;
  font-size: 0.86rem;
  color: var(--fg-muted);
  white-space: nowrap;
  background: none;
  cursor: pointer;
}
.ws-tab:hover { color: var(--fg); text-decoration: none; }
.ws-tab.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
.ws-tabs__warroom {
  flex-shrink: 0;
  margin-left: auto;
  padding: 0 0.9rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
  white-space: nowrap;
}
.ws-tabs__warroom:hover { color: var(--accent); }

.ws-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.ws-filter-bar label {
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-weight: 500;
}
.ws-filter-bar select { margin-top: 0.3rem; }
.ws-filter-help {
  font-size: 0.75rem;
  color: var(--fg-subtle);
  max-width: 48ch;
}

.ws-content { margin-top: 1.5rem; }
.ws-content > .section:last-child { margin-bottom: 0; }

.ws-coverage-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 1rem;
}
.ws-coverage-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.75rem 0.9rem;
  font-size: 0.86rem;
  background: var(--bg-raised);
}
.ws-coverage-card.active { border-color: var(--accent); background: var(--accent-muted); }
.ws-coverage-card__count { font-size: 1.15rem; font-weight: 600; margin-top: 0.25rem; }

.exposure-check__headline { font-size: 1.4rem; margin-bottom: 0.4rem; }
.exposure-check__sub { max-width: 70ch; }
.exposure-check textarea { font-family: var(--font-mono); font-size: 0.85rem; }

.ws-dual-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
@media (max-width: 860px) {
  .ws-dual-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .ws-panel { padding: 1rem; }
  .ws-refresh { width: 100%; }
}
