/* ============================================================
   ADMIN - extends style.css (loaded first) so the admin pages read as
   part of the same site: same fonts, same navy/red palette, same header
   pattern, same .button/.kicker/.h2 building blocks. This file only adds
   the handful of admin-specific components style.css doesn't already
   have (login card, upload form, status messages, the current-PDF
   panel).
   ============================================================ */

/* Admin pages don't have a hero, so - same pattern as
   .affiliatesPage__spacer - they need explicit clearance under the fixed
   header. */
.adminPage__spacer { height: calc(var(--header-h) + 32px); }

.adminPage__narrow { max-width: 560px; }
.adminPage__wide { max-width: 920px; }

/* The site's real .header__nav hides itself below 1620px (in favor of the
   hamburger + slide-in mobile menu), but admin pages only ever have 1-2
   links and skip that hamburger markup entirely - so admin's nav uses its
   own always-visible class instead of .header__nav, and never disappears
   on normal screen widths. */
.admin__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin__nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--body);
  padding: 8px 13px;
  text-decoration: none;
}
.admin__nav a:hover { color: var(--navy); }

.admin__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(10, 21, 43, 0.06);
  margin-bottom: 24px;
}

.admin__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.admin__input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy);
  background: var(--paper);
}
.admin__input:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(31, 61, 140, 0.12);
}

.admin__msg {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.admin__msg--success { background: #E7F5EC; color: #1A7A3D; }
.admin__msg--error { background: #FCEAEC; color: var(--red-dark); }

.admin__current {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--stone);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--body);
}
.admin__current a { color: var(--royal); font-weight: 600; }

/* Per-route status cards - a responsive grid instead of a single stacked
   list, so five routes read as five distinct, scannable tiles rather than
   one long strip of text. */
.admin__routeGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.admin__routeCard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--stone);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.admin__routeCard:hover {
  border-color: rgba(31, 61, 140, 0.25);
  box-shadow: 0 4px 16px rgba(10, 21, 43, 0.08);
}
.admin__routeCard--empty { background: transparent; }

.admin__routeCardTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin__routeBadge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--royal);
  background: rgba(31, 61, 140, 0.1);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.admin__fileIcon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}
.admin__fileIcon--pdf { background: var(--red); }
.admin__fileIcon--xlsx { background: #1A7A3D; }

.admin__routeFile {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  word-break: break-word;
  margin: 0;
}

.admin__routeMeta {
  font-size: 12.5px;
  color: var(--muted);
  margin: -4px 0 0;
}

.admin__routeEmpty {
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

.admin__routeLink {
  font-size: 13px;
  font-weight: 600;
  color: var(--royal);
  text-decoration: none;
  margin-top: auto;
}
.admin__routeLink:hover { text-decoration: underline; }

/* Upload form: route + file side by side on wider screens */
.admin__formRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 640px) {
  .admin__formRow { grid-template-columns: 1fr; }
}
.admin__formField { display: flex; flex-direction: column; }

.admin__input--file {
  padding: 10px 14px;
  font-size: 14px;
}

.admin__hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.admin__topbar {
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin__topbar span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

button.admin__submit {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--navy);
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  cursor: pointer;
}
button.admin__submit:hover { background: var(--royal); }
