/* ==========================================================================
   Straatwaarde Crew Planning - application styles.

   Sections, in order:
     1. base            resets and typography
     2. layout          page shell and containers
     3. navigation      the top bar
     4. controls        buttons, inputs, switches
     5. cards & panels
     6. planning grid   the desktop matrix
     7. planning cards  the mobile equivalent
     8. map
     9. tables          admin
    10. feedback        toasts, empty states, loading
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700&display=swap');

/* == 1. base =============================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* Anything given an explicit display - .field, .switch, .nav__badge - would
   otherwise outrank the user-agent [hidden] rule and stay on screen after
   being hidden from script. One rule settles it for the whole app. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-weight: 700;
}

h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--brand-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* == 2. layout ============================================================= */

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-7);
}

.page--narrow {
  max-width: 720px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.page-head__title {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.page-head__subtitle {
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.row--end {
  justify-content: flex-end;
}

.row--between {
  justify-content: space-between;
}

/* == 3. navigation ========================================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: var(--nav-height);
  padding: 0 var(--space-5);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav__brand span {
  color: var(--brand);
}

.nav__counts {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}

/* The two year-to-date totals: booked shows and options. */
.count-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.count-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.count-chip--boeking::before {
  background: var(--ja);
}

.count-chip--optie::before {
  background: var(--optie);
}

.count-chip strong {
  color: var(--ink);
  font-size: var(--text-sm);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.nav__link:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.nav__link[aria-current='page'] {
  background: var(--brand-wash);
  color: var(--brand-bright);
}

.nav__badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
}

/* Raised above .button, which is defined later and would otherwise win the
   specificity tie and keep the toggle visible on desktop. */
.nav .nav__toggle {
  display: none;
  margin-left: auto;
}

/* == 4. controls =========================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

.button:hover:not(:disabled) {
  background: var(--brand-bright);
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-muted);
}

.button--ghost:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--brand);
  color: var(--ink);
}

.button--danger {
  background: transparent;
  border-color: color-mix(in srgb, var(--nee) 45%, transparent);
  color: var(--nee);
}

.button--danger:hover:not(:disabled) {
  background: var(--nee-wash);
}

.button--small {
  padding: 0.35rem 0.7rem;
  font-size: var(--text-xs);
}

.button--block {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  line-height: 1.5;
}

.field__error {
  font-size: var(--text-xs);
  color: var(--nee);
}

.input,
.select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-base);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

.input::placeholder {
  color: var(--ink-faint);
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-wash);
}

.input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.input--inline {
  padding: 0.3rem 0.5rem;
  font-size: var(--text-sm);
  background: transparent;
  border-color: transparent;
}

.input--inline:hover:not(:disabled) {
  border-color: var(--line-strong);
}

/* A checkbox that reads as a switch. */
.switch {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__track {
  flex: 0 0 auto;
  position: relative;
  width: 40px;
  height: 23px;
  margin-top: 1px;
  border-radius: var(--radius-pill);
  background: var(--open);
  transition: background var(--normal) var(--ease);
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--normal) var(--ease);
}

.switch input:checked + .switch__track {
  background: var(--brand);
}

.switch input:checked + .switch__track::after {
  transform: translateX(17px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
}

.switch__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch__title {
  font-size: var(--text-sm);
  font-weight: 600;
}

.switch__hint {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  line-height: 1.5;
}

.switch input:disabled ~ .switch__text {
  opacity: 0.5;
}

/* The JA / OPTIE / NEE control, used on cards and in the open-requests list. */
.answer-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.answer {
  padding: 0.5rem 0.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}

.answer:hover:not(:disabled) {
  border-color: currentColor;
}

.answer--ja:hover:not(:disabled),
.answer--ja[aria-pressed='true'] {
  color: var(--ja);
  border-color: var(--ja);
}

.answer--optie:hover:not(:disabled),
.answer--optie[aria-pressed='true'] {
  color: var(--optie);
  border-color: var(--optie);
}

.answer--nee:hover:not(:disabled),
.answer--nee[aria-pressed='true'] {
  color: var(--nee);
  border-color: var(--nee);
}

.answer[aria-pressed='true'] {
  background: currentColor;
  font-weight: 700;
}

.answer--ja[aria-pressed='true'] {
  background: var(--ja);
  color: #fff;
}

.answer--optie[aria-pressed='true'] {
  background: var(--optie);
  color: var(--ink-inverse);
}

.answer--nee[aria-pressed='true'] {
  background: var(--nee);
  color: #fff;
}

.answer:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* == 5. cards & panels ===================================================== */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.panel__title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* The "next show" hero on the planning page. */
.next-show {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-raised), var(--surface));
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.next-show__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.next-show__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.7fr 2fr;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.next-show__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.next-show__key {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.next-show__value {
  font-size: var(--text-lg);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.next-show__value--muted {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--ink-muted);
}

/* == 6. planning grid ====================================================== */

/* The grid is its own scroll region rather than growing the page. Setting
   overflow-x alone would force overflow-y to auto anyway, and the sticky
   header would then anchor to this box while the page scrolled past it.
   Owning the scrolling outright is what makes the header actually pin. */
.grid-wrap {
  overflow: auto;
  max-height: calc(100vh - var(--nav-height) - var(--space-6));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overscroll-behavior: contain;
}

.grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
}

.grid th,
.grid td {
  padding: var(--space-3);
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.grid thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-raised);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line-strong);
}

.grid th.th--person {
  min-width: 82px;
}

.grid th.th--person small {
  display: block;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.grid td:first-child,
.grid th:first-child {
  text-align: left;
  padding-left: var(--space-4);
}

.grid tbody tr:hover td {
  background: color-mix(in srgb, var(--surface-hover) 60%, transparent);
}

.grid tbody tr:last-child td {
  border-bottom: none;
}

/* A 3px rail on the left of each row carrying the overall status. */
.grid td.cell--type {
  border-left: 3px solid transparent;
}

tr[data-status='ok'] td.cell--type {
  border-left-color: var(--ja);
}

tr[data-status='warn'] td.cell--type {
  border-left-color: var(--optie);
}

tr[data-status='danger'] td.cell--type {
  border-left-color: var(--nee);
}

/* The two blocks - stage crew and FOH - get a tinted wash instead of the
   solid fill production used, so the checkboxes stay readable. */
td.block--stage[data-status='ok'],
td.block--foh[data-status='ok'] {
  background: var(--ja-wash);
}

td.block--stage[data-status='warn'],
td.block--foh[data-status='warn'] {
  background: var(--optie-wash);
}

td.block--stage[data-status='danger'],
td.block--foh[data-status='danger'] {
  background: var(--nee-wash);
}

td.block--foh {
  border-left: 1px solid var(--line-strong);
}

.type-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.type-tag--boeking {
  background: var(--brand-wash);
  color: var(--brand-bright);
}

.type-tag--optie {
  background: color-mix(in srgb, var(--optie) 16%, transparent);
  color: var(--optie);
}

.callsheet-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

/* The three availability squares inside a grid cell. */
.marks {
  display: inline-flex;
  gap: 4px;
}

.mark {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}

.mark:hover:not(:disabled) {
  transform: scale(1.12);
}

.mark--ja[aria-pressed='true'] {
  background: var(--ja);
  border-color: var(--ja);
}

.mark--optie[aria-pressed='true'] {
  background: var(--optie);
  border-color: var(--optie);
}

.mark--nee[aria-pressed='true'] {
  background: var(--nee);
  border-color: var(--nee);
}

.mark:disabled {
  opacity: 0.45;
  cursor: default;
}

.mark:disabled:hover {
  transform: none;
}

/* == 7. planning cards (mobile) ============================================ */

.show-cards {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
}

.show-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.show-card[data-status='ok'] {
  border-left-color: var(--ja);
}

.show-card[data-status='warn'] {
  border-left-color: var(--optie);
}

.show-card[data-status='danger'] {
  border-left-color: var(--nee);
}

.show-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.show-card__location {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.25;
}

.show-card__when {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.show-card__section {
  margin-top: var(--space-4);
}

.show-card__section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--space-2);
}

.crew-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: var(--space-2);
}

.crew-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.crew-chip__name {
  font-size: 0.6875rem;
  line-height: 1.3;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-chip__bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--open);
}

.crew-chip__bar[data-answer='JA'] {
  background: var(--ja);
}

.crew-chip__bar[data-answer='OPTIE'] {
  background: var(--optie);
}

.crew-chip__bar[data-answer='NEE'] {
  background: var(--nee);
}

/* == 8. map ================================================================ */

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.map-toolbar__group {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.map-toolbar__spacer {
  margin-left: auto;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  cursor: pointer;
}

.checkline input {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
}

.slider-row output {
  min-width: 7rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}

input[type='range'] {
  flex: 1;
  accent-color: var(--brand);
  min-width: 140px;
}

#map {
  height: min(70vh, 720px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  z-index: 0;
}

.pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-body);
}

.pin--past {
  background: var(--brand-dim);
}

.pin--boeking {
  background: var(--ja);
}

.pin--optie {
  background: var(--optie);
}

.pin__distance {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
  text-shadow: 0 1px 2px var(--bg);
}

.leaflet-popup-content-wrapper {
  background: var(--surface-raised);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.leaflet-popup-tip {
  background: var(--surface-raised);
}

.leaflet-popup-content {
  margin: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.popup__title {
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: 2px;
}

.popup__meta {
  color: var(--ink-muted);
}

/* == 9. tables (admin) ===================================================== */

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
}

.data-table th,
.data-table td {
  padding: var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table th {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.data-table th.is-center,
.data-table td.is-center {
  text-align: center;
}

.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-hover) 50%, transparent);
}

.data-table input[type='checkbox'] {
  accent-color: var(--brand);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pill--ok {
  background: var(--ja-wash);
  color: var(--ja);
}

.pill--pending {
  background: var(--optie-wash);
  color: var(--optie);
}

.pill--off {
  background: var(--nee-wash);
  color: var(--nee);
}

/* == 10. feedback ========================================================== */

.toast-host {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 15rem;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  pointer-events: auto;
  animation: toast-in var(--normal) var(--ease);
}

.toast--success {
  border-left-color: var(--ja);
}

.toast--error {
  border-left-color: var(--nee);
}

.toast.is-leaving {
  animation: toast-out var(--fast) var(--ease) forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(4px);
  }
}

.empty {
  display: grid;
  place-items: center;
  gap: var(--space-2);
  padding: var(--space-7) var(--space-4);
  text-align: center;
  color: var(--ink-muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.empty__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-hover) 37%,
    var(--surface) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0 50%;
  }
}

/* Centred single-purpose screens: sign in, choose a password. */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-5);
}

.auth__card {
  width: 100%;
  max-width: 24rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}

.auth__brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: var(--space-1);
}

.auth__brand span {
  color: var(--brand);
}

.auth__tagline {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-5);
}

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.alert--error {
  background: var(--nee-wash);
  color: var(--nee);
  border: 1px solid color-mix(in srgb, var(--nee) 30%, transparent);
}

.alert--info {
  background: var(--brand-wash);
  color: var(--brand-bright);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}

/* Small stat tiles on the profile page. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--space-3);
}

.stat {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.stat__value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1;
  color: var(--brand-bright);
}

.stat__label {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* == responsive ============================================================ */

@media (max-width: 1080px) {
  .grid-wrap {
    display: none;
  }

  .show-cards {
    display: flex;
  }

  .next-show__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
}

@media (max-width: 860px) {
  .nav {
    flex-wrap: wrap;
    height: auto;
    padding: var(--space-3) var(--space-4);
    row-gap: var(--space-3);
  }

  .nav__counts {
    order: 2;
  }

  .nav .nav__toggle {
    display: inline-flex;
    order: 3;
  }

  .nav__links {
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height var(--normal) var(--ease), opacity var(--fast) var(--ease);
  }

  .nav__links.is-open {
    max-height: 22rem;
    opacity: 1;
    padding-top: var(--space-2);
    border-top: 1px solid var(--line);
  }

  .nav__link {
    padding: var(--space-3);
  }

  .page {
    padding: var(--space-5) var(--space-4) var(--space-6);
  }

  h1 {
    font-size: var(--text-2xl);
  }

  .next-show__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .map-toolbar__spacer {
    margin-left: 0;
  }

  .toast-host {
    left: var(--space-4);
    right: var(--space-4);
  }
}

@media print {
  .nav,
  .toast-host,
  .button {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
