/* /htdocs/assets/app.css */

:root {
  --bg:            #f4f5f7;
  --surface:       #ffffff;
  --ink:           #1c2030;
  --ink-soft:      #5b6172;
  --rule:          #e2e5eb;

  /* Brand — sampled from the awards logo ────────────────────────────────────────────────── */
  --brand-navy:    #1a3d7c;
  --brand-navy-dk: #142e5e;
  --brand-red:     #d8291f;
  --brand-red-dk:  #b8211a;

  --state-upcoming:    #8b93a7;
  --state-open:        #0a7d4b;
  --state-closing:     #b26a00;
  --state-closed:      #6b7280;
  --state-upcoming-bg: #eef0f4;
  --state-open-bg:     #e6f4ec;
  --state-closing-bg:  #fdf3e0;
  --state-closed-bg:   #f0f1f4;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/*  ──  Header / footer ────────────────────────────────────────────────── ... */

header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.site__brand {
  display: inline-block;
  text-decoration: none;
  padding: 24px 0;
}

.site__logo {
  display: block;
  height: 128px;
  width: auto;
  margin: 0;
}

footer.site {
  border-top: 2px solid var(--brand-navy);
  margin-top: 48px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
footer.site p { padding: 16px 0; margin: 0; }

main.wrap {
  padding-top: 32px;
  padding-bottom: 8px;
}

/*  ──  Banner   ─────────────────────────────────────────────────────────────  */

.banner {
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 40px;
  border: 1px solid var(--rule);
  background: var(--state-upcoming-bg);
}
.banner--open         { background: var(--state-open-bg);    border-color: #b6dcc7; }
.banner--closing_soon { background: var(--state-closing-bg); border-color: #f0d9ab; }
.banner--upcoming     { background: var(--state-upcoming-bg); }
.banner--closed       { background: var(--state-closed-bg); }
.banner--error        { background: #fdecec; border-color: #f5c6c6; }

.banner__eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.banner--closing_soon .banner__eyebrow { color: var(--brand-red); }

.banner__headline {
  margin: 0 0 10px;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.banner__blurb {
  margin: 0 0 12px;
  color: var(--ink-soft);
  max-width: 56ch;
}

.banner__meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.banner__cta { margin: 14px 0 4px; }

/*  ──  Timeline   ─────────────────────────────────────────────────────────────  */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  position: relative;
}
.timeline__item + .timeline__item { margin-top: 12px; }

.timeline__item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -12px;
  width: 2px;
  background: var(--rule);
}
.timeline__item--open:not(:last-child)::before,
.timeline__item--closing_soon:not(:last-child)::before {
  background: linear-gradient(to bottom, var(--state-open) 0%, var(--rule) 100%);
}

.timeline__marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--state-upcoming-bg);
  color: var(--state-upcoming);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--surface);
  position: relative;
  z-index: 1;
}
.timeline__item--open .timeline__marker {
  background: var(--state-open);
  color: #fff;
}
.timeline__item--closing_soon .timeline__marker {
  background: var(--state-closing);
  color: #fff;
}
.timeline__item--closed .timeline__marker {
  background: var(--state-closed-bg);
  color: var(--state-closed);
}

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px 20px 18px;
}
.timeline__item--open         .timeline__card { border-color: #b6dcc7; }
.timeline__item--closing_soon .timeline__card { border-color: #f0d9ab; }
.timeline__item--closed       .timeline__card { opacity: 0.72; }

.timeline__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timeline__label {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.timeline__range {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.timeline__blurb {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.timeline__cta { margin: 12px 0 0; }

.timeline__hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.timeline__hint--warn {
  color: var(--state-closing);
  font-weight: 500;
}

/*  ──  Badges   ─────────────────────────────────────────────────────────────  */

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--upcoming     { background: var(--state-upcoming-bg); color: var(--state-upcoming); }
.badge--open         { background: var(--state-open-bg);     color: var(--state-open); }
.badge--closing_soon { background: var(--state-closing-bg);  color: var(--state-closing); }
.badge--closed       { background: var(--state-closed-bg);   color: var(--state-closed); }

/*  ──  Buttons   ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 0.12s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand-navy);
  color: #fff;
}
.btn--primary:hover { background: var(--brand-navy-dk); }

.banner--closing_soon .btn--primary {
  background: var(--brand-red);
}
.banner--closing_soon .btn--primary:hover {
  background: var(--brand-red-dk);
}

/*  ──  Small screens   ───────────────────────────────────────────────────────────── */

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  margin: 24px auto 0;
}
.panel__headline {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.panel__blurb {
  margin: 0 0 20px;
  color: var(--ink-soft);
}
.panel__small {
  margin: 20px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.panel__small a { color: var(--brand-navy); }

.form__label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.form__input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.form__input:focus {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(26, 61, 124, 0.15);
}
.form__input--code {
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.form__submit {
  margin-top: 20px;
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  padding: 13px 18px;
}

.notice {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.92rem;
  margin: 0 0 20px;
}
.notice--error   { background: #fdecec; color: #a02020; border: 1px solid #f5c6c6; }
.notice--success { background: #e6f4ec; color: #0a7d4b; border: 1px solid #b6dcc7; }

/* ── /htdocs/assets/app.css — admin tables ──────────────────────────────────────────────────*/

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.92rem;
}
.admin-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  background: #f9fafb;
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .weight-input { width: 80px; padding: 8px 10px; font-size: 0.95rem; }

@media (max-width: 720px) {
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td {
    display: block; width: 100%;
  }
  .admin-table tr {
    border-bottom: 1px solid var(--rule);
    padding: 12px 16px;
  }
  .admin-table td {
    border: none; padding: 4px 0;
  }
}

@media (max-width: 520px) {
  .site__logo { height: 96px; }

  .banner { padding: 22px 20px; }
  .banner__headline { font-size: 1.3rem; }

  .timeline__item { grid-template-columns: 32px 1fr; gap: 12px; }
  .timeline__marker { width: 32px; height: 32px; font-size: 0.85rem; }
  .timeline__item:not(:last-child)::before { left: 15px; top: 32px; }
  .panel { padding: 24px; }
}

/* /htdocs/assets/app.css — admin home  ────────────────────────────────────────────────── */

.wrap--admin { max-width: 1080px; }

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site__logo--admin { height: 56px; }

.admin-nav { font-size: 0.92rem; }
.admin-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 20px;
  padding-bottom: 2px;
}
.admin-nav a:hover { color: var(--brand-navy); }
.admin-nav a.is-active {
  color: var(--brand-navy);
  font-weight: 600;
  border-bottom: 2px solid var(--brand-navy);
}

.crumb {
  margin: 24px 0 12px;
  font-size: 0.88rem;
}
.crumb a {
  color: var(--ink-soft);
  text-decoration: none;
}
.crumb a:hover { color: var(--brand-navy); }

/* Card grid ────────────────────────────────────────────────── */
.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.admin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px 24px 56px;
  min-height: 160px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.05s ease;
}

.admin-card--ready:hover {
  border-color: var(--brand-navy);
  box-shadow: 0 6px 18px rgba(26, 61, 124, 0.08);
  transform: translateY(-2px);
}

.admin-card--soon {
  opacity: 0.62;
  cursor: not-allowed;
}

.admin-card__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.admin-card__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.admin-card__status {
  position: absolute;
  left: 24px;
  bottom: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}
.admin-card__status--ready { background: var(--state-open-bg); color: var(--state-open); }
.admin-card__status--soon  { background: var(--state-closed-bg); color: var(--state-closed); }

/* Judge add grid ────────────────────────────────────────────────── */
.judge-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

/* Muted button variant ────────────────────────────────────────────────── */
.btn--muted {
  background: #eef0f4;
  color: var(--ink);
  padding: 6px 12px;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 720px) {
  .judge-add-grid { grid-template-columns: 1fr; }
  .admin-bar { flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 12px; }
  .admin-nav a:first-child { margin-left: 0; }
}

/* admin nav role badge ────────────────────────────────────────────────── */

.admin-nav__role {
  margin-left: 20px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.admin-nav__role .badge {
  margin-left: 6px;
  vertical-align: middle;
}

@media (max-width: 720px) {
  .admin-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .admin-nav a { margin-left: 0; }
  .admin-nav__role { margin-left: 0; }
}

/* /htdocs/assets/app.css — nominee form ────────────────────────────────────────────────── */

.autocomplete {
  position: relative;
}

.autocomplete__list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--rule);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.autocomplete__item {
  padding: 10px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f1f4;
}
.autocomplete__item:last-child { border-bottom: none; }
.autocomplete__item:hover,
.autocomplete__item[aria-selected="true"] {
  background: #f4f5f7;
}
.autocomplete__item--empty {
  color: var(--ink-soft);
  font-style: italic;
  cursor: default;
}
.autocomplete__item--empty:hover { background: transparent; }

/* Radio pills ────────────────────────────────────────────────── */
.radio-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  background: #fff;
  font-size: 0.95rem;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.radio-pill:hover { border-color: var(--brand-navy); }
.radio-pill input { margin: 0; accent-color: var(--brand-navy); }
.radio-pill:has(input:checked) {
  border-color: var(--brand-navy);
  background: rgba(26,61,124,0.06);
  font-weight: 600;
}

/* Print styles ────────────────────────────────────────────────── */
@media print {
  .no-print, header.site, footer.site, .crumb, .btn { display: none !important; }
  body { background: #fff; }
  .wrap--admin { max-width: none; padding: 0; }
  .admin-table { border: 1px solid #ccc; border-radius: 0; }
  .admin-table thead th { background: #eee !important; color: #000 !important; }
  .admin-table td, .admin-table thead th { padding: 6px 10px; font-size: 11pt; }
}
/* /htdocs/assets/app.css — admin stats */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.stat-card__value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}

.stat-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.stat-card--open { border-color: #b6dcc7; background: var(--state-open-bg); }
.stat-card--open .stat-card__value { color: var(--state-open); }

.stat-card--closing_soon { border-color: #f0d9ab; background: var(--state-closing-bg); }
.stat-card--closing_soon .stat-card__value { color: var(--state-closing); }

.stat-card--upcoming { background: var(--state-upcoming-bg); }
.stat-card--upcoming .stat-card__value { color: var(--ink-soft); }

.stat-card--closed { background: var(--state-closed-bg); }
.stat-card--closed .stat-card__value { color: var(--state-closed); }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
}
/* /htdocs/assets/app.css — danger button */
.btn--danger {
  background: #d8291f;
  color: #fff;
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn--danger:hover {
  background: #b8211a;
}