/* Minimal overrides on top of Pico — just enough to make the dense table
   readable on a laptop screen and to dim disabled view tabs. */

main.container {
  max-width: 1400px;
}

table {
  font-size: 0.85rem;
}

table th, table td {
  padding: 0.4rem 0.6rem;
  white-space: nowrap;
}

/* Click-to-sort column headers (total / nc_roas). The link fills the cell
   so the whole header is clickable, not just the text. The arrow is dim
   when the column isn't the active sort and full-opacity when it is. */
th.sort-header a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

th.sort-header a:hover {
  text-decoration: underline;
}

th.sort-header .sort-arrow {
  opacity: 0.35;
  font-size: 0.85em;
}

th.sort-header .sort-arrow.active {
  opacity: 1;
}

/* 3-column filter row: Brand · Campaign · Week. Pico's `grid` class makes
   children equal-width, but campaign names can be long, so let the campaign
   column take a bit more room. */
.filter-grid {
  grid-template-columns: 1fr 2fr 1.4fr;
}

@media (max-width: 768px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

.view-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}

.view-tabs a {
  text-decoration: none;
}

#refresh-zone {
  margin: 1rem 0;
}

article.error {
  border-left: 4px solid var(--pico-color-red-500, #dc2626);
}

/* Login page — centered card on an otherwise empty page. */
.login-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 2rem;
  margin: 0;
}

.login-card hgroup {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-card hgroup h2 {
  margin-bottom: 0.25rem;
}

.login-card form button {
  width: 100%;
  margin-top: 0.5rem;
}

.login-error {
  display: block;
  margin: 0.25rem 0 0.75rem;
  color: var(--pico-color-red-500, #dc2626);
}

/* Top-right "Sign out" link in the dashboard header. */
.session-bar {
  display: flex;
  justify-content: flex-end;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.session-bar a {
  text-decoration: none;
}
