:root {
  /* "Cool Slate" palette — cools the page/card neutrals so plain-white cards don't read as
     glaring next to the header; also makes --accent pop harder by contrast. */
  --bg: #eef1f5;
  --card: #f8fafc;
  --accent: #c12729;
  --text: #1c2430;
  --muted: #66707d;
  --onsale: #1e9e5c;
  --presale: #b8860b;
  --upcoming: #2e75b6;
  --border: #dde3ea;
  --border-soft: #ccd3da;
  --search-tint: #eef2f7;
  --favorites-tint: #f8f2e3;
  --location-tint: #eaf5ee;
  --alerts-bg: #eef0f3;
  --alert-item-bg: #f8fafc;
  --alert-item-border: #e2e7ec;
  --placeholder-bg: #dde3ea;
  --hover-bg: #e6eaef;
  --input-bg: #eef1f5;
  --shadow-soft: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --favorite-glow-bg: rgba(184, 134, 11, 0.14);
  --favorite-glow-shadow: rgba(184, 134, 11, 0.35);
}
[data-theme="dark"] {
  --bg: #0f1115;
  --card: #262d35;
  --text: #f0f0f0;
  --muted: #9aa0aa;
  --onsale: #2ecc71;
  --presale: #f1c40f;
  --upcoming: #5dade2;
  --border: #262b36;
  --border-soft: #3a3a3a;
  --search-tint: #17202b;
  --favorites-tint: #201c14;
  --location-tint: #14201a;
  --alerts-bg: #1c1f27;
  --alert-item-bg: #22262f;
  --alert-item-border: #22262f;
  --placeholder-bg: #111111;
  --hover-bg: #22262f;
  --input-bg: #1a1d24;
  --shadow-soft: rgba(0, 0, 0, 0.4);
  --shadow-medium: rgba(0, 0, 0, 0.5);
  --favorite-glow-bg: rgba(241, 196, 15, 0.18);
  --favorite-glow-shadow: rgba(241, 196, 15, 0.55);
}
/* header, its search forms, and its username/admin/logout text are deliberately NOT themed —
   the header stays a fixed light strip regardless of the dark-mode toggle below, per design. */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.5rem;
  column-gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e2e2;
}
h1.brand-title { margin: 0; display: flex; align-items: center; }
.home-link { text-decoration: none; cursor: pointer; color: inherit; }
.home-link:hover h1 { opacity: 0.85; }
.brand-logo { width: 300px; height: 72px; object-fit: contain; display: block; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.search-form { display: flex; flex-wrap: wrap; gap: 0.4rem; flex: 1; max-width: 290px; }
.search-form input,
.search-form select {
  flex: 1;
  background: #ffffff;
  color: #20242c;
  border: 1px solid #d5d5d5;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
  min-width: 0;
}
.search-form .radius-input { flex: 0 0 4.5rem; }
.search-form button[type="submit"] { flex: 1 0 100%; padding: 0.4rem; font-size: 0.85rem; }
/* Fixed light styling, not tied to the theme variables — this sits inside the header, which
   stays a fixed light strip regardless of the dark-mode toggle (see the note at the top of
   this file). */
.date-range-wrap { position: relative; flex: 0 0 auto; }
.date-range-btn {
  background: #ffffff;
  border: 1px solid #d5d5d5;
  color: #6b7178;
  width: 2rem;
  height: 100%;
  min-height: 1.9rem;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.date-range-btn:hover { opacity: 1; border-color: #a8790a; color: #a8790a; }
.date-range-btn.has-range { border-color: #c12729; color: #c12729; }
.date-range-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  background: #ffffff;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  padding: 0.75rem;
  min-width: 12rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #20242c;
}
.date-range-panel.hidden { display: none; }
.date-range-panel label { display: flex; flex-direction: column; gap: 0.2rem; }
.date-range-panel input[type="date"] {
  background: #ffffff;
  color: #20242c;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  padding: 0.3rem 0.4rem;
  font-size: 0.85rem;
}
.date-range-actions { display: flex; gap: 0.5rem; margin-top: 0.2rem; }
.date-range-actions button { flex: 1; font-size: 0.8rem; padding: 0.35rem 0.5rem; }
.date-range-actions #clearDateRangeBtn { background: transparent; border: 1px solid #d5d5d5; color: #6b7178; }
/* These two carry longer placeholder text ("Search shows/venues: Town or Zip code") plus a
   radius select (and, for shows, the date-range icon) than the shared 290px cap fits. */
#locationSearchForm, #venueSearchForm { max-width: 380px; }
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.pagination.hidden { display: none; }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination span { color: var(--muted); font-size: 0.85rem; }
#searchResults {
  padding: 0.75rem 1.5rem;
  background: var(--search-tint);
  border-bottom: 1px solid var(--border);
}
#searchResults.hidden { display: none; }
#favoritesSection {
  padding: 0.75rem 1.5rem;
  background: var(--favorites-tint);
  border-bottom: 1px solid var(--border);
}
#favoritesSection.hidden { display: none; }
#locationResults {
  padding: 0.75rem 1.5rem;
  background: var(--location-tint);
  border-bottom: 1px solid var(--border);
}
#locationResults.hidden { display: none; }
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.tracked-tag {
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  align-self: flex-start;
}
.current-user {
  color: #6b7178;
  font-size: 0.8rem;
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}
#adminLink { color: #a8790a; font-size: 0.85rem; }
#adminLink.hidden { display: none; }
.user-menu { position: relative; }
.user-menu-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #6b7178;
}
.user-menu-caret { flex-shrink: 0; transition: transform 0.15s; }
.user-menu-btn[aria-expanded="true"] .user-menu-caret { transform: rotate(180deg); }
.user-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  background: #ffffff;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  padding: 0.35rem;
  min-width: 9rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.user-menu-panel.hidden { display: none; }
.user-menu-item {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
  color: #20242c;
  font-size: 0.85rem;
  text-decoration: none;
}
.user-menu-item:hover { background: #f4f5f7; }
.user-menu-item.hidden { display: none; }
.theme-toggle {
  background: transparent;
  border: 1px solid #d5d5d5;
  color: #6b7178;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle:hover { opacity: 1; border-color: #a8790a; color: #a8790a; }
.theme-toggle .bulb-glass { transition: fill 0.15s; }
.theme-toggle.is-dark { color: #b8860b; border-color: #b8860b; background: rgba(184, 134, 11, 0.12); }
.theme-toggle.is-dark .bulb-glass { fill: #20242c; }
.registration-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}
button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
button:hover { opacity: 0.9; }
#alertsPanel {
  padding: 0.75rem 1.5rem;
  background: var(--alerts-bg);
  border-bottom: 1px solid var(--border);
}
.alerts-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; row-gap: 0.4rem; }
.alerts-header h2 { margin: 0.25rem 0; font-size: 1rem; }
.alerts-header-actions { display: flex; gap: 0.5rem; align-items: center; }
.alerts-header-left { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.location-genre-inline { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); }
.location-genre-inline label { display: flex; align-items: center; gap: 0.3rem; cursor: pointer; white-space: nowrap; }
.location-genre-inline label:first-child { font-weight: 600; color: var(--text); }
.alert-settings-btn {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--muted);
}
.alert-settings-btn:hover { border-color: var(--presale); color: var(--text); opacity: 1; }
.alerts-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}
@media (max-width: 900px) {
  .alerts-columns { grid-template-columns: 1fr; }
}
.alerts-column-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
.alerts-column-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.35rem; }
.alert-item {
  padding: 0.4rem 0.6rem;
  background: var(--alert-item-bg);
  border: 1px solid var(--alert-item-border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.alert-item.on_sale { border-left-color: var(--onsale); }
.alert-item.presale { border-left-color: var(--presale); }
.alert-item.selling_soon { border-left-color: var(--presale); }
.alert-item-clickable { cursor: pointer; }
.alert-item-clickable:hover { background: var(--card); }
.alert-item .ts { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.alert-item-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--placeholder-bg);
}
.alert-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}
.alert-item-text span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alert-item-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.alert-item-actions .favorite-show-btn,
.alert-item-actions .dismiss-show-btn,
.alert-item-actions .mark-seen-btn {
  font-size: 0.68rem;
  padding: 0.2rem 0.4rem;
  white-space: nowrap;
}
.mark-seen-btn {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--muted);
}
.mark-seen-btn:hover { border-color: var(--accent); color: var(--text); }
.alert-settings-intro { color: var(--muted); font-size: 0.85rem; margin: 0 0 1rem; }
.alert-setting-row {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
.alert-setting-row:last-of-type { border-bottom: none; }
.alert-setting-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.alert-setting-toggle input { margin-top: 0.2rem; flex-shrink: 0; }
.alert-setting-desc { color: var(--muted); font-size: 0.8rem; font-weight: normal; }
.alert-setting-venue-list {
  margin-top: 0.6rem;
  margin-left: 1.6rem;
  padding: 0.6rem;
  background: var(--input-bg);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  max-height: 12rem;
  overflow-y: auto;
}
.alert-settings-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.save-btn { background: var(--onsale); color: #06210f; font-weight: 600; }
.save-btn:hover { opacity: 0.85; }
.cancel-btn { background: var(--accent); color: white; }
.cancel-btn:hover { opacity: 0.85; }
.alert-setting-venue-list.hidden { display: none; }
.alert-sub-venue-panel-title {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
#filters {
  padding: 0.75rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.85rem;
}
#filters select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border-soft);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
}
#filters a { color: var(--muted); margin-left: auto; }
.venue-multiselect { position: relative; }
.venue-multiselect-btn {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border-soft);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 9rem;
  text-align: left;
}
.venue-multiselect-btn::after { content: " ▾"; color: var(--muted); }
.venue-multiselect-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 0.5rem;
  min-width: 14rem;
  max-height: 16rem;
  overflow-y: auto;
  box-shadow: 0 6px 16px var(--shadow-medium);
}
.venue-multiselect-panel.hidden { display: none; }
.venue-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.2rem;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
}
.venue-option:hover { background: var(--hover-bg); border-radius: 4px; }
.venue-option-all {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.3rem;
  padding-bottom: 0.5rem;
  font-weight: 600;
}
main {
  padding: 1rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.event-card {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
@keyframes highlight-flash {
  0%, 100% { box-shadow: 0 1px 3px var(--shadow-soft), 0 0 0 0 rgba(193, 39, 41, 0); }
  15%, 85% { box-shadow: 0 1px 3px var(--shadow-soft), 0 0 0 4px rgba(193, 39, 41, 0.55); }
}
.event-card.highlight-flash { animation: highlight-flash 2.2s ease-in-out; }
.event-card img { width: 100%; height: 140px; object-fit: cover; background: var(--placeholder-bg); }
.event-body { padding: 0.75rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.event-body h3 { margin: 0; font-size: 1rem; }
.event-venue { color: var(--muted); font-size: 0.8rem; }
.event-date { font-size: 0.85rem; }
.card-top-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.status-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
}
.spotify-link { color: #1DB954; display: flex; align-items: center; flex-shrink: 0; }
.spotify-link:hover { opacity: 0.8; }
.status-onsale { background: var(--onsale); color: #06210f; }
.status-presale { background: var(--presale); color: #332800; }
.status-upcoming { background: var(--upcoming); color: #06263d; }
.sales-breakdown { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.75rem; }
.sales-group { border-left: 3px solid var(--border-soft); padding-left: 0.5rem; }
.sales-group-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}
.sales-current { border-left-color: var(--onsale); }
.sales-current .sales-group-title { color: var(--onsale); }
.sales-upcoming { border-left-color: var(--upcoming); }
.sales-upcoming .sales-group-title { color: var(--upcoming); }
.sales-previous { border-left-color: var(--border-soft); opacity: 0.75; }
.sales-previous .sales-group-title { color: var(--muted); }
.sale-phase { color: var(--text); line-height: 1.4; display: block; }
.sales-previous .sale-phase { color: var(--muted); }
.sale-phase-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.sale-phase-link:hover { color: var(--onsale); }
.sales-previous-rest.hidden { display: none; }
.see-more-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 0.72rem;
  padding: 0.15rem 0;
  cursor: pointer;
  text-decoration: underline;
}
.products-list { font-size: 0.75rem; color: var(--presale); }
.products-list a { color: var(--presale); }
.card-actions {
  display: flex;
  align-items: flex-start;
  margin-top: auto;
  padding-top: 0.5rem;
  gap: 0.5rem;
}
.ticketmaster-link {
  /* Fixed square (not stretch/aspect-ratio) — those fought with the image's intrinsic
     200x200 size inside an auto-sized grid track and produced a runaway-huge icon. */
  width: 2.98rem;
  height: 2.98rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.ticketmaster-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ticketmaster-link:hover { border-color: var(--accent); }
.card-buttons-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 0.35rem;
}
.dismiss-show-btn, .dismiss-artist-btn, .favorite-show-btn, .favorite-artist-btn {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 0.7rem;
  padding: 0.22rem 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Only the main-card 2x2 grid wants these stretched to fill their cell; alert-item buttons
   should size to their (short) label so they don't get needlessly ellipsized. */
.card-buttons-grid .dismiss-show-btn,
.card-buttons-grid .dismiss-artist-btn,
.card-buttons-grid .favorite-show-btn,
.card-buttons-grid .favorite-artist-btn {
  width: 100%;
}
.dismiss-show-btn:hover, .dismiss-artist-btn:hover { border-color: var(--accent); color: var(--accent); }
.favorite-show-btn:hover, .favorite-artist-btn:hover { border-color: var(--presale); color: var(--presale); }
.favorite-show-btn.active, .favorite-artist-btn.active {
  border-color: var(--presale);
  color: var(--presale);
  background: var(--favorite-glow-bg);
  box-shadow: 0 0 6px var(--favorite-glow-shadow);
}
.venue-group-heading {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 1.25rem -1.5rem 0.5rem;
  padding: 0.6rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), #8a1c1e);
  border-radius: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}
.venue-group-heading:first-child { margin-top: 0; }
.venue-group-count {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--card); padding: 1.5rem; border-radius: 10px;
  width: 400px; max-height: 70vh; overflow-y: auto;
}
.dismissed-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.empty-state { color: var(--muted); padding: 2rem; grid-column: 1/-1; text-align: center; }
.venues-modal-content { width: 520px; }
.venue-search-results {
  max-height: 14rem;
  overflow-y: auto;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.venue-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.venue-result-info { font-size: 0.85rem; }
.venue-result-city { color: var(--muted); font-size: 0.75rem; }
.venue-select-btn {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.venue-select-btn:hover { border-color: var(--onsale); color: var(--text); }
.venue-select-btn.active {
  border-color: var(--onsale);
  color: #06210f;
  background: var(--onsale);
  font-weight: 600;
}

/* --- Login screen (AUTH_MODE=otp deployments only) ---
   Fixed light styling, not tied to the theme variables — same reasoning as the header: the
   logo's dark wordmark needs a light background to stay readable, regardless of whichever
   theme the visitor last toggled on this browser. */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f5f7;
}
.login-screen.hidden { display: none; }
.login-step.hidden { display: none; }
.login-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 2rem;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}
.login-card h1.brand-title { margin: 0 0 1rem; justify-content: center; }
.login-card .brand-logo { width: 100%; max-width: 260px; height: auto; }
.login-card p { color: #6b7178; font-size: 0.85rem; margin: 0 0 1rem; }
.login-card form { display: flex; flex-direction: column; gap: 0.6rem; }
.login-card input {
  background: #f4f5f7;
  color: #20242c;
  border: 1px solid #d5d5d5;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
.login-card button[type="submit"] {
  margin-top: 0.4rem;
  padding: 0.6rem;
  font-size: 0.9rem;
}
.login-error {
  color: #c12729;
  font-size: 0.8rem;
  margin-top: 0.6rem;
  min-height: 1em;
}
#loginBackLink {
  display: block;
  margin-top: 0.75rem;
  color: #6b7178;
  font-size: 0.8rem;
  text-align: center;
}
#appRoot.hidden { display: none; }
.login-legal {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7178;
}
.login-legal a { color: #6b7178; }
.site-footer {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}
.site-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-sep { opacity: 0.5; }

/* Standalone legal pages (privacy.html, terms.html) don't load app.js, so they never get the
   dark-mode toggle — always rendered in the light theme's fixed values. */
.legal-body { background: #f4f5f7; color: #20242c; margin: 0; }
.legal-header { padding: 1.1rem 1.5rem; background: #ffffff; border-bottom: 1px solid #e2e2e2; }
.legal-logo { width: 220px; height: 53px; }
.legal-page { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem 3rem; line-height: 1.6; }
.legal-page h1 { margin-bottom: 0.25rem; }
.legal-updated { color: #6b7178; font-size: 0.85rem; margin-top: 0; }
.legal-page h2 { font-size: 1.05rem; margin-top: 1.75rem; }
.legal-page ul { padding-left: 1.25rem; }
.legal-back { margin-top: 2rem; }
.legal-back a { color: var(--accent); }
