/* =========================================================
   COPB — Campeonato Paraibano · style.css (arquivo único)
   Todas as páginas usam APENAS este arquivo.
   Cores e fontes vivem em :root — troque a paleta só ali.

   Índice
   1. Tokens         6. Home             11. Responsivo (site público)
   2. Base           7. Etapas           12. Área logada (chip usuário)
   3. Componentes    8. Classificação    13. Painel administrativo
   4. Cabeçalho      9. Formulários      14. Formulário largo (insc. ave)
   5. Rodapé         10. Regras          15. Responsivo (painel/insc. ave)
   ========================================================= */

/* ============ 1. TOKENS ============ */
:root {
  /* cores base */
  --bg: #faf7f2;
  --bg-alt: #f3eee6;
  --surface: #ffffff;
  --on-dark: #ffffff;
  --ink: #1e1e1c;
  --text: #5c5a53;
  --placeholder: #a8a296;
  --line: #e7e1d7;

  /* marca */
  --primary: #1b3a2d;
  --primary-hover: #12291f;
  --accent: #c4622d;
  --accent-hover: #a94f22;

  /* apoio */
  --gold: #c9922b;
  --silver: #858585;
  --bronze: #b06a3a;
  --ph: #ddd7cb;

  --tag-blue-bg: #e6eef6;
  --tag-blue: #2c5a85;
  --tag-yellow-bg: #fbf1d6;
  --tag-yellow: #7a5b10;
  --tag-green-bg: #e4f1e8;
  --tag-green: #24623d;
  --tag-red-bg: #f8e5e0;
  --tag-red: #8a3418;

  --badge-done-bg: #eee9e0;
  --badge-done-tx: #6b675e;

  --danger: #b23a2e;
  --danger-hover: #93301f;

  /* tipografia */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* forma */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(30, 30, 20, 0.05);
  --shadow-md: 0 10px 30px rgba(30, 30, 28, 0.08);
  --shadow-lg: 0 24px 60px rgba(30, 30, 28, 0.14);

  --gutter: 78px;
}

/* ============ 2. BASE ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1;
  min-width: 0;
}
main.wrap {
  width: 100%;
}
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--primary);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============ 3. COMPONENTES ============ */
.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 26px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.btn-sm {
  height: 34px;
  padding: 0 20px;
  font-size: 14px;
}
.btn-block {
  width: 100%;
}
.btn-solid {
  background: var(--accent);
  color: var(--on-dark);
}
.btn-solid:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-dark);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-line {
  background: transparent;
  color: var(--accent);
}
.btn-line:hover {
  background: var(--accent);
  color: var(--on-dark);
}

.page-hero {
  padding-block: 56px 40px;
}
.page-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 16px 0 8px;
}
.lead {
  max-width: 60ch;
  color: var(--text);
}
.page-body {
  padding-bottom: 96px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.pill {
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.pill:hover {
  border-color: var(--primary);
}
.pill[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-dark);
}

.ph {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ph);
  color: var(--text);
  font-size: 13px;
  text-align: center;
}
.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============ 4. CABEÇALHO (igual em todas as páginas) ============ */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  object-fit: cover;
}
.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.1;
  color: var(--primary);
}
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}
.menu-main {
  display: flex;
  gap: 34px;
  font-size: 15px;
}
.menu-main a {
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  color: var(--text);
  transition: color 0.2s;
}
.menu-main a:hover {
  color: var(--accent);
}
.menu-main a[aria-current="page"] {
  color: var(--primary);
  border-bottom-color: var(--accent);
}
.menu-auth {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
}
.menu-auth > a:not(.btn) {
  color: var(--ink);
  transition: color 0.2s;
}
.menu-auth > a:not(.btn):hover,
.menu-auth > a[aria-current="page"] {
  color: var(--accent);
}

/* ============ 5. RODAPÉ (igual em todas as páginas) ============ */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--text);
}
.footer-sponsors-section {
  padding: 42px 0 38px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
}
.footer-sponsors {
  text-align: center;
}
.footer-sponsors .footer-title {
  margin-bottom: 24px;
}
.footer-sponsors .sponsor-logos {
  grid-template-columns: repeat(auto-fit, minmax(150px, 200px));
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  max-width: 960px;
  margin-inline: auto;
}
.footer-sponsors .sponsor-logos a {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 14px 18px;
  border: 1px solid rgba(231, 225, 215, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.footer-sponsors .sponsor-logos a:hover,
.footer-sponsors .sponsor-logos a:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(27, 58, 45, 0.28);
  box-shadow: 0 8px 20px rgba(27, 58, 45, 0.09);
}
.footer-sponsors .sponsor-logos img {
  margin-inline: auto;
  max-height: 78px;
}
.footer-sponsors .sponsors-empty {
  margin: 0 auto;
  padding: 14px 20px;
  width: fit-content;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(150px, 0.8fr) minmax(190px, 1fr);
  gap: clamp(32px, 6vw, 88px);
  padding-top: 40px;
  padding-bottom: 40px;
}
.footer-grid > div {
  min-width: 0;
}
.footer-grid > div + div {
  padding-left: 28px;
}
.footer-brand {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}
.footer-grid p {
  max-width: 34ch;
  line-height: 1.7;
}
.footer-title {
  margin-bottom: 14px;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.2;
  text-transform: none;
}
.footer-list {
  display: grid;
  gap: 9px;
  color: var(--ink);
}
.footer-grid > div:first-child > a:last-child {
  display: inline-flex;
  padding: 4px;
  border-radius: 50%;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.footer-grid > div:first-child > a:last-child:hover,
.footer-grid > div:first-child > a:last-child:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(27, 58, 45, 0.16);
}
.sponsor-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  align-items: center;
  gap: 14px;
}
.sponsor-logos a,
.sponsor-logos img {
  display: block;
}
.sponsor-logos img {
  width: 100%;
  max-width: 190px;
  height: 76px;
  object-fit: contain;
}
.sponsors-empty {
  color: var(--text);
  font-size: 14px;
}
.sponsor-admin-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.sponsor-admin-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sponsor-admin-item > img {
  width: 120px;
  height: 72px;
  object-fit: contain;
}
.sponsor-admin-item > div {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.sponsor-admin-item small {
  overflow-wrap: anywhere;
  color: var(--text);
}
.my-registration-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.my-registration-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.my-registration-list li > div {
  display: grid;
  gap: 4px;
}
.my-registration-list li > div span {
  color: var(--text);
  font-size: 14px;
}
.registration-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-alt);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 24px 20px;
  background: rgba(255, 255, 255, 0.3);
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}
.whatsapp-link {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
  color: #168b45;
  font-weight: 700;
  transition: transform 180ms ease, filter 180ms ease;
}
.whatsapp-link:hover,
.whatsapp-link:focus-visible {
  transform: scale(1.18);
  filter: drop-shadow(0 2px 5px rgba(37, 211, 102, 0.65));
}
.whatsapp-link:focus-visible {
  outline: 2px solid #25d366;
  outline-offset: 3px;
}

/* ============ 6. HOME ============ */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding-block: 52px 100px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.875rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 16px 0 22px;
}
.hero h1 em {
  color: var(--accent);
  font-style: italic;
  font-weight: 600;
}
.hero .lead {
  max-width: 540px;
}
.lead b {
  font-weight: 600;
  color: var(--ink);
}
.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 44px;
}
.stats {
  display: flex;
  gap: 56px;
}
.stats svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.6;
}
.stats strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  color: var(--primary);
}
.stats span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
.hero-media {
  position: relative;
}
.hero-img {
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  background: transparent;
}
.hero-badge {
  position: absolute;
  left: -24px;
  bottom: -24px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.hero-badge .eyebrow {
  font-size: 11px;
}
.hero-badge strong {
  display: block;
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--primary);
}
.hero-badge span:last-child {
  font-size: 12px;
  color: var(--text);
}

.mods {
  padding-bottom: 88px;
}
.mods h2,
.scoring h2 {
  font-size: 38px;
  font-weight: 600;
  margin-top: 12px;
}
.mod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.mod-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.mod-card .ph {
  aspect-ratio: 4 / 3;
}
.mod-body {
  padding: 16px 20px 20px;
}
.mod-body p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}
.tag.blue {
  background: var(--tag-blue-bg);
  color: var(--tag-blue);
}
.tag.yellow {
  background: var(--tag-yellow-bg);
  color: var(--tag-yellow);
}
.tag.green {
  background: var(--tag-green-bg);
  color: var(--tag-green);
}
.tag.red {
  background: var(--tag-red-bg);
  color: var(--tag-red);
}

.scoring {
  padding-block: 80px;
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}
.scoring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.scoring .intro {
  max-width: 480px;
  margin-top: 20px;
}
.scoring .intro b {
  font-weight: 600;
  color: var(--ink);
}
.steps {
  display: grid;
  gap: 16px;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.steps .num {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-dark);
  font-family: var(--font-display);
  font-size: 14px;
}
.steps li:nth-child(2) .num {
  background: var(--gold);
}
.steps strong {
  display: block;
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
}
.steps span:not(.num) {
  font-size: 14px;
  color: var(--text);
}

.cta {
  padding-block: 80px 100px;
}
.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 56px 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cta-box h2 {
  font-size: 32px;
  margin: 12px 0 10px;
}
.cta-box p:not(.eyebrow) {
  max-width: 480px;
  color: var(--text);
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ 7. ETAPAS ============ */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 392px));
  gap: 20px;
}
.stage-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stage-num {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.badge {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}
.badge-done {
  background: var(--badge-done-bg);
  color: var(--badge-done-tx);
}
.badge-open {
  background: var(--tag-green-bg);
  color: var(--tag-green);
}
.stage-card h2 {
  margin: 20px 0 14px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
.meta {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.meta li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text);
}
.meta .price {
  font-weight: 600;
  color: var(--primary);
}
.actions {
  display: flex;
  gap: 8px;
}
.actions .btn {
  flex: 1;
}

/* ============ 8. CLASSIFICAÇÃO ============ */
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 460px;
  margin-top: 32px;
  padding: 14px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--placeholder);
}
.search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--tag-green-bg);
}
.search-field svg {
  flex-shrink: 0;
}
.search-field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
}
.search-field input::placeholder {
  color: var(--placeholder);
}

.ranking-wrap {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.table-scroll {
  overflow-x: auto;
}
.ranking {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}
.ranking-col-position { width: 8%; }
.ranking-col-bird { width: 17%; }
.ranking-col-owner { width: 18%; }
.ranking-col-points { width: 11%; }
.ranking-col-mark { width: 12%; }
.ranking-col-stages { width: 8%; }
.ranking-col-certificate { width: 14%; }
.ranking th,
.ranking td {
  padding: 14px 16px;
  overflow-wrap: anywhere;
}
.ranking th {
  background: var(--bg-alt);
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.ranking td {
  vertical-align: middle;
}
.ranking th:first-child,
.ranking td:first-child,
.ranking th:nth-child(n+4):not(:last-child),
.ranking td:nth-child(n+4):not(:last-child),
.ranking th:last-child,
.ranking td:last-child {
  text-align: center;
}
.ranking th:nth-child(5),
.ranking th:nth-child(6) {
  font-size: 13px;
  line-height: 1.35;
}
.ranking tbody tr {
  border-top: 1px solid var(--line);
  transition: background 0.15s;
}
.ranking tbody tr:hover {
  background: var(--bg);
}
.ranking tbody tr.ranking-podium {
  background: rgba(255, 255, 255, 0.62);
}
.ranking tbody tr.ranking-podium:hover {
  background: rgba(255, 255, 255, 0.92);
}
.ranking tbody tr.ranking-podium-1 {
  background: linear-gradient(90deg, rgba(218, 175, 65, 0.16), rgba(255, 255, 255, 0.62) 42%);
}
.ranking tbody tr.ranking-podium-2 {
  background: linear-gradient(90deg, rgba(155, 165, 175, 0.15), rgba(255, 255, 255, 0.62) 42%);
}
.ranking tbody tr.ranking-podium-3 {
  background: linear-gradient(90deg, rgba(174, 112, 65, 0.14), rgba(255, 255, 255, 0.62) 42%);
}
.ranking-medal {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(27, 58, 45, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  font-size: 23px;
  line-height: 1;
  box-shadow: 0 2px 7px rgba(27,  58, 45, 0.1);
}
.ranking-position {
  display: inline-grid;
  min-width: 2.1em;
  height: 2.1em;
  padding-inline: 0.35em;
  place-items: center;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ranking-podium-1 .ranking-position {
  background: #f2dfaa;
  color: #684b0e;
}
.ranking-podium-2 .ranking-position {
  background: #e5e8eb;
  color: #4d5862;
}
.ranking-podium-3 .ranking-position {
  background: #efd4bf;
  color: #70421f;
}
.ranking-bird {
  color: var(--primary);
  font-weight: 700;
}
.ranking-points strong {
  color: var(--primary);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.ranking .num {
  text-align: right;
}
.ranking .owner {
  color: var(--accent);
}
.ranking .sum-strong {
  font-weight: 600;
}
.ranking .pts {
  font-weight: 700;
}
.rank-badge,
.rank-plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 14px;
  font-weight: 700;
}
.rank-badge {
  border-radius: 50%;
  background: var(--placeholder);
  color: var(--on-dark);
}
.rank-badge.gold {
  background: var(--gold);
}
.rank-badge.silver {
  background: var(--silver);
}
.rank-badge.bronze {
  background: var(--bronze);
}
.rank-plain {
  font-weight: 500;
  color: var(--text);
}

/* ============ 9. FORMULÁRIOS (entrar / cadastro / inscrição) ============ */
.auth-section {
  padding-block: 64px 96px;
}
.auth-box {
  max-width: 400px;
  margin-inline: auto;
  text-align: center;
}
.auth-box .page-title {
  margin: 12px 0 28px;
}
.auth-card {
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: left;
}
.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.field-help {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.5;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
}
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font-body);
}
.field select {
  appearance: none;
  color: var(--ink);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1L6 6L11 1' stroke='%235c5a53' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field textarea {
  resize: vertical;
  min-height: 84px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--placeholder);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
}
.field .required {
  color: var(--accent);
}
.field-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}
.field-grid-2 > .field {
  min-width: 0;
}
.field-grid-2 > .field input,
.field-grid-2 > .field select,
.field-grid-2 > .field textarea {
  min-width: 0;
}
.field.full {
  grid-column: 1 / -1;
}
.form-note {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text);
}
.form-note a {
  font-weight: 600;
  color: var(--accent);
}
.form-note a:hover {
  text-decoration: underline;
}

/* ============ 10. REGRAS ============ */
.rules-card {
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.rules-block + .rules-block {
  margin-top: 32px;
  padding-top: 32px;
}
.rules-block h2 {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
}
.rules-block p {
  max-width: 68ch;
  margin-bottom: 16px;
  color: var(--ink);
}
.rules-block p:last-child {
  margin-bottom: 0;
}
.rules-block strong {
  font-weight: 600;
}
.rules-list,
.rules-ordered {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 16px 0;
}
.rules-list li {
  position: relative;
  padding-left: 18px;
}
.rules-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
}
.rules-ordered {
  counter-reset: step;
}
.rules-ordered li {
  position: relative;
  padding-left: 26px;
  counter-increment: step;
}
.rules-ordered li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0;
  font-weight: 500;
  color: var(--text);
}

/* ============ 11. RESPONSIVO ============ */
@media (max-width: 900px) {
  :root {
    --gutter: 32px;
  }
  .nav {
    flex-wrap: wrap;
    row-gap: 12px;
    padding-block: 14px;
  }
  .menu-main {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .hero {
    grid-template-columns: 1fr;
    padding-block: 40px 72px;
  }
  .hero-badge {
    left: 16px;
    bottom: -20px;
  }
  .mod-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .scoring-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cta-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 32px;
  }
  .stage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
  .footer-grid > div + div {
    padding-left: 20px;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 20px;
  }
  body {
    font-size: 1rem;
  }
  .page-hero {
    padding-block: 40px 28px;
  }
  .stats {
    gap: 28px;
  }
  .mods h2,
  .scoring h2 {
    font-size: 30px;
  }
  .cta-box h2 {
    font-size: 26px;
  }
  .mod-grid,
  .stage-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    gap: 32px;
    padding-top: 32px;
    padding-bottom: 32px;
  }
  .footer-sponsors-section {
    padding: 32px 0;
  }
  .footer-sponsors .sponsor-logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .footer-sponsors .sponsor-logos a {
    min-height: 96px;
    padding: 10px;
  }
  .footer-grid > div + div {
    padding-left: 0;
    border-left: 0;
  }
  .footer-grid > :first-child {
    grid-column: auto;
  }
  .filters {
    gap: 8px;
  }
  .rules-card {
    padding: 24px;
  }
  .auth-section {
    padding-block: 40px 64px;
  }
  .auth-card {
    padding: 24px 20px;
  }
}

/* ============ 12. ÁREA LOGADA (chip de usuário no cabeçalho) ============ */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--ink);
  background: transparent;
}
.user-chip.filled {
  background: var(--bg-alt);
  border-color: transparent;
  font-weight: 500;
}
.icon-btn {
  display: flex;
  align-items: center;
  padding: 6px;
  background: none;
  border: none;
  color: var(--ink);
  transition: color 0.2s;
}
.icon-btn:hover {
  color: var(--accent);
}

/* ============ 13. PAINEL ADMINISTRATIVO ============ */
.panel-intro {
  padding-block: 40px 28px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.stat-card {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--primary);
}

.tab-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}
.tab-btn {
  height: 38px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-dark);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-bottom: 96px;
  align-items: start;
}
.content-grid[hidden] {
  display: none;
}
.panel-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 20px;
}

.stage-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stage-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.stage-item .stage-meta {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.stage-item .stage-name {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.stage-item .stage-detail {
  font-size: 13px;
  color: var(--text);
}
.stages-admin-panel {
  margin-top: 24px;
}
.admin-stages-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-stages-table th,
.admin-stages-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13px;
}
.admin-stages-table th {
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-stage-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 12px;
}
.admin-stage-actions {
  display: flex;
  min-width: 160px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.admin-stage-actions form {
  margin: 0;
}
.admin-stage-actions .btn-sm {
  height: auto;
  min-height: 34px;
  padding-block: 7px;
  white-space: normal;
}
.admin-stages-table tbody tr:last-child td {
  border-bottom: 0;
}
.admin-enrollment-group {
  margin-top: 24px;
}
.admin-enrollment-group h3 {
  margin-bottom: 10px;
}
.admin-enrollments-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: left;
}
.admin-enrollments-table th,
.admin-enrollments-table td {
  padding: 11px 10px;
  border: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13px;
}
.admin-enrollments-table th {
  background: var(--bg-alt);
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.admin-enrollments-table tbody tr:nth-child(even) {
  background: #fcfbf9;
}
.admin-enrollments-table tbody tr:hover {
  background: #f3f6f1;
}
.admin-enrollments-table form {
  margin: 0;
}
.admin-enrollments-table .delete-btn {
  white-space: nowrap;
}
.admin-draw-panel {
  margin: 0 0 20px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.admin-draw-title {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}
.admin-draw-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-draw-buttons form {
  flex: 1 1 180px;
  margin: 0;
}
.admin-draw-buttons button {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  white-space: nowrap;
}
.admin-draw-buttons button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.enrollment-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.enrollment-row-actions > form {
  margin: 0;
}
.enrollment-row-actions .btn-sm,
.enrollment-row-actions .delete-btn {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}
.enrollment-row-actions .delete-btn {
  background: var(--surface);
  color: var(--danger);
}
.enrollment-row-actions .delete-btn:hover {
  border-color: var(--danger);
  background: #fff6f4;
  color: var(--danger-hover);
}
.enrollment-edit summary {
  list-style: none;
  cursor: pointer;
}
.enrollment-edit summary::-webkit-details-marker {
  display: none;
}
.enrollment-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
  width: min(460px, calc(100vw - 64px));
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.enrollment-edit-form label {
  display: grid;
  gap: 4px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.enrollment-edit-form input,
.enrollment-edit-form select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  font-size: 12px;
}
.enrollment-edit-form > button {
  grid-column: 1 / -1;
}
.delete-btn {
  padding: 4px;
  background: none;
  border: none;
  color: var(--danger);
  transition: color 0.2s;
}
.delete-btn:hover {
  color: var(--danger-hover);
}

/* ============ 14. FORMULÁRIO LARGO (Inscrição de ave) ============ */
.form-section {
  padding-block: 56px 96px;
}
.form-card {
  max-width: 760px;
  margin-inline: auto;
  padding: 40px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ============ 15. RESPONSIVO (painel e inscrição de ave) ============ */
@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .field-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-card {
    padding: 32px;
  }
}
@media (max-width: 560px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .form-card {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Melhorias comuns de navegação, filtros e áreas administrativas. */
.menu-auth form {
  margin: 0;
}
.menu-main a:focus-visible,
.menu-auth a:focus-visible,
.btn:focus-visible {
  border-radius: var(--radius-pill);
}
.admin-toolbar {
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.admin-mode-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}
.admin-mode-buttons .btn {
  min-height: 42px;
}
.admin-toolbar > .btn {
  min-height: 42px;
  flex: 1 0 auto;
  justify-content: center;
  white-space: nowrap;
}
.admin-back-link {
  margin: 12px 0 24px;
}
.content-grid {
  padding-bottom: 32px;
}
.content-grid > .panel-card:only-child {
  grid-column: 1 / -1;
}
.panel-card fieldset {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.panel-card legend {
  padding: 0 8px;
  font-weight: 600;
  color: var(--primary);
}
.stage-card .actions {
  flex-wrap: wrap;
}
[role="status"] {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--ink);
}
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.championship-banner {
  display: flex;
  justify-content: center;
  padding-block: 24px 0;
}
.championship-banner img {
  display: block;
  width: min(100%, 1040px);
  height: auto;
  margin-inline: auto;
  object-fit: contain;
}
.hero {
  padding-block: 8px 100px;
}
.hero-img {
  width: min(100%, 420px);
}

@media (max-width: 900px) {
  .menu-main {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 22px;
  }
  .menu-auth {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
  }
}

@media (max-width: 560px) {
  .menu-auth {
    width: 100%;
    justify-content: space-between;
  }
  .user-chip {
    max-width: calc(100% - 190px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-mode-buttons .btn {
    flex: 1 1 100%;
  }
  .admin-toolbar > .btn {
    flex: 1 0 auto;
  }
  .panel-card {
    padding: 22px 18px;
  }
  .ranking th,
  .ranking td {
    padding: 12px 14px;
  }
  .sponsor-admin-item {
    flex-wrap: wrap;
    gap: 12px;
  }
  .sponsor-admin-item > img {
    width: 88px;
    height: 60px;
    flex: none;
  }
  .sponsor-admin-item > div {
    flex: 1 1 calc(100% - 104px);
    overflow-wrap: anywhere;
  }
  .sponsor-admin-item > form {
    flex: 1 1 100%;
  }
  .sponsor-admin-item > form .btn {
    width: 100%;
  }
}

/* Cartões do calendário de etapas */
.stage-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  align-items: stretch;
  gap: 24px;
}
.stage-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  padding: 26px;
}
.stage-card > .eyebrow {
  margin-top: 18px;
  overflow-wrap: anywhere;
}
.stage-card h2 {
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.stage-card .meta {
  gap: 12px;
  margin-bottom: 18px;
}
.stage-card .meta li {
  display: block;
  line-height: 1.45;
}
.stage-card .meta li strong {
  margin-right: 4px;
  color: var(--ink);
}
.stage-card .stage-enrollment-meta {
  display: block;
}
.stage-modality-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 5px;
  color: var(--text);
}
.stage-modality-counts span {
  white-space: nowrap;
}
.stage-description {
  margin-bottom: 18px;
  color: var(--text);
}
.stage-card-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.stage-registration h3 {
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.stage-modality-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.stage-modality-actions .btn {
  width: 100%;
  min-width: 0;
  padding-inline: 10px;
  white-space: normal;
  text-align: center;
  flex: initial;
}
.stage-results-link {
  width: 100%;
  flex: initial !important;
}
.stage-full-message,
.empty-state {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text);
}

/* Tabela de gestão de usuários */
.users-page {
  padding-block: 20px 18px;
}
.users-page .page-title {
  margin: 6px 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}
.users-page > [role="status"] {
  margin-bottom: 10px;
  padding: 8px 12px;
}
.users-page > .panel-card:first-of-type {
  padding: 16px 20px;
}
.users-page > .panel-card:first-of-type h2 {
  margin-bottom: 10px;
}
.users-page .field {
  margin-bottom: 10px;
}
.users-page .field-grid-2 {
  gap: 10px 16px;
}
.users-page .field input,
.users-page .field select {
  min-height: 40px;
  padding-block: 7px;
}
.users-page .field-grid-2 .btn {
  height: 40px;
}
.users-panel {
  margin-top: 12px;
  padding: 16px 20px;
}
.users-panel-wide {
  width: calc(100% + 2 * var(--gutter));
  margin-left: calc(-1 * var(--gutter));
}
.users-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.users-heading h2 {
  margin: 4px 0 6px;
  font-size: 25px;
}
.users-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.users-help {
  color: var(--text);
  font-size: 14px;
}
.users-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid #cfe3d4;
  border-radius: var(--radius-pill);
  background: var(--tag-green-bg);
  color: var(--tag-green);
  font-size: 13px;
  white-space: nowrap;
}
.users-count strong {
  font-size: 19px;
  line-height: 1;
}
.users-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(200px, 0.8fr);
  gap: 12px;
  margin: 10px 0;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.users-filters .field {
  margin: 0;
}
.users-filters input,
.users-filters select,
.profile-form select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
  color: var(--ink);
  font: inherit;
}
.users-table-scroll {
  overflow: visible;
  border: 1px solid #cfc8bc;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.users-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
.users-table th:nth-child(1),
.users-table td:nth-child(1) {
  width: 5%;
}
.users-table th:nth-child(2),
.users-table td:nth-child(2) {
  width: 15%;
}
.users-table th:nth-child(3),
.users-table td:nth-child(3) {
  width: 19%;
}
.users-table th:nth-child(4),
.users-table td:nth-child(4) {
  width: 12%;
}
.users-table th:nth-child(5),
.users-table td:nth-child(5) {
  width: 10%;
}
.users-table th:nth-child(6),
.users-table td:nth-child(6) {
  width: 10%;
}
.users-table th:nth-child(7),
.users-table td:nth-child(7) {
  width: 10%;
}
.users-table th:nth-child(8),
.users-table td:nth-child(8) {
  width: 19%;
}
.users-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 9px;
  background: var(--primary);
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  border-bottom: 1px solid var(--primary-hover);
  text-align: left;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}
.users-table th:last-child {
  border-right: 0;
}
.users-table th:first-child {
  border-radius: 12px 0 0;
}
.users-table th:last-child {
  border-radius: 0 12px 0 0;
}
.users-table td {
  padding: 6px;
  border-top: 1px solid #d9d3c9;
  border-right: 1px solid #d9d3c9;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.users-table td:last-child {
  border-right: 0;
}
.users-table tbody tr:nth-child(even) {
  background: #fcfbf9;
}
.users-table tbody tr {
  transition: background 0.15s ease;
}
.users-table tbody tr:hover {
  background: #f3f6f1;
}
.users-table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 12px;
}
.users-table tbody tr:last-child td:last-child {
  border-radius: 0 0 12px;
}
.users-id {
  color: var(--placeholder);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.users-name {
  font-weight: 650;
  color: var(--primary);
}
.users-email {
  color: var(--text);
  overflow-wrap: anywhere;
}
.users-date {
  color: var(--text);
  white-space: nowrap;
  font-size: 13px;
}
.user-role {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
}
.role-visitante {
  background: var(--tag-blue-bg);
  color: var(--tag-blue);
}
.role-socio {
  background: var(--tag-green-bg);
  color: var(--tag-green);
}
.role-administrador {
  background: var(--tag-yellow-bg);
  color: var(--tag-yellow);
}
.role-operador {
  background: var(--tag-blue-bg);
  color: var(--tag-blue);
}
.profile-form {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.profile-form select {
  min-width: 0;
  flex: 1 1 76px;
  min-height: 30px;
  padding: 3px 22px 3px 7px;
  font-size: 11px;
}
.profile-form .btn {
  flex: none;
  min-height: 30px;
  height: 30px;
  padding-inline: 6px;
  font-size: 11px;
}
.users-locked {
  color: var(--text);
  font-size: 13px;
}
.users-empty {
  padding: 18px;
  text-align: center;
  color: var(--text);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 560px) {
  .users-page {
    padding-block: 18px 16px;
  }
  .users-panel {
    padding: 14px 12px;
  }
  .users-table {
    font-size: 12px;
  }
  .users-table th,
  .users-table td {
    padding: 8px 6px;
  }
  .users-table th {
    font-size: 9px;
    white-space: normal;
  }
  .users-table .profile-form {
    flex-wrap: wrap;
  }
  .users-table .profile-form select {
    min-width: 0;
    padding-inline: 6px;
  }
  .users-filters {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .users-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .stage-grid {
    gap: 16px;
  }
  .stage-card {
    padding: 22px 18px;
  }
}

@media (max-width: 760px) {
  .users-table-scroll {
    border: 0;
    box-shadow: none;
  }
  .users-table,
  .users-table tbody,
  .users-table tr,
  .users-table td {
    display: block;
    width: 100%;
  }
  .users-table {
    table-layout: auto;
    border-spacing: 0;
  }
  .users-table thead {
    display: none;
  }
  .users-table tbody {
    display: grid;
    gap: 12px;
  }
  .users-table tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }
  .users-table td {
    display: grid;
    width: auto;
    grid-template-columns: minmax(88px, 32%) minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-top: 1px solid var(--line);
    border-right: 0;
    font-size: 12px;
  }
  .users-table td:nth-child(n) {
    width: auto;
  }
  .users-table td:first-child {
    border-top: 0;
  }
  .users-table td::before {
    color: var(--text);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .users-table td:nth-child(1)::before { content: "ID"; }
  .users-table td:nth-child(2)::before { content: "Nome"; }
  .users-table td:nth-child(3)::before { content: "Email"; }
  .users-table td:nth-child(4)::before { content: "Telefone"; }
  .users-table td:nth-child(5)::before { content: "CTF"; }
  .users-table td:nth-child(6)::before { content: "Perfil"; }
  .users-table td:nth-child(7)::before { content: "Cadastro"; }
  .users-table td:nth-child(8)::before { content: "Ações"; }
}

/* Cobertura responsiva comum para todas as páginas e áreas autenticadas. */
*,
*::before,
*::after {
  min-width: 0;
}

.wrap,
main,
section,
article,
aside,
form {
  min-width: 0;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.table-scroll > table {
  width: 100%;
}

.ranking-scroll-hint {
  display: none;
}

.admin-stages-table {
  min-width: 760px;
}

.admin-enrollments-table {
  min-width: 900px;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

@media (max-width: 760px) {
  :root {
    --gutter: 24px;
  }

  .wrap {
    width: 100%;
  }

  .page-body,
  .content-grid,
  .panel-intro,
  .form-section,
  .auth-section {
    padding-bottom: 48px;
  }

  .content-grid,
  .field-grid-2,
  .scoring-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel-card,
  .form-card,
  .rules-card {
    max-width: 100%;
  }

  .users-panel-wide {
    width: 100%;
    margin-left: 0;
  }

  .users-table-scroll {
    max-width: 100%;
  }

  .admin-mode-buttons,
  .tab-bar,
  .filters,
  .ctas,
  .actions,
  .admin-draw-buttons,
  .enrollment-row-actions {
    flex-wrap: wrap;
  }

  .enrollment-row-actions > form,
  .enrollment-row-actions > details {
    max-width: 100%;
  }

  .enrollment-edit-form {
    width: min(460px, calc(100vw - 48px));
  }

  .cta-box {
    padding: 32px 24px;
  }

  .ranking-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .championship-banner {
    padding-block: 16px 0;
  }

  .hero {
    padding-block: 0 56px;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }

  .wrap {
    padding-inline: var(--gutter);
  }

  .nav {
    gap: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand small {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .menu-main {
    gap: 8px 14px;
    font-size: 14px;
  }

  .menu-auth {
    gap: 8px;
  }

  .menu-auth .btn {
    padding-inline: 16px;
  }

  .page-title {
    font-size: clamp(1.8rem, 9vw, 2.5rem);
    overflow-wrap: anywhere;
  }

  .auth-card,
  .form-card,
  .rules-card,
  .panel-card {
    padding: 20px 16px;
  }

  .btn {
    min-height: 44px;
    height: auto;
    padding: 12px 18px;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
  }

  .btn-sm {
    min-height: 36px;
    padding: 8px 12px;
  }

  .stage-modality-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats {
    flex-wrap: wrap;
    gap: 20px 28px;
  }

  .hero-badge {
    right: 8px;
    left: 8px;
    width: fit-content;
    max-width: calc(100% - 16px);
  }

  .championship-banner {
    padding-block: 12px 0;
  }

  .hero {
    padding-block: 0 40px;
  }

  .footer-bottom {
    padding-inline: 16px;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 560px) {
  .ranking {
    width: max-content;
    min-width: 100%;
    table-layout: fixed;
  }

  .ranking-col-position { width: calc(12vw - 4.8px); }
  .ranking-col-bird { width: calc(26vw - 10.4px); }
  .ranking-col-owner { width: calc(34vw - 13.6px); }
  .ranking-col-points { width: calc(28vw - 11.2px); }
  .ranking-col-mark { width: 120px; }
  .ranking-col-stages { width: 72px; }
  .ranking-col-certificate { width: 112px; }

  .ranking-wrap .table-scroll {
    overflow-x: auto;
  }

  .ranking th,
  .ranking td {
    padding: 8px 3px;
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  .ranking th:first-child,
  .ranking td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 2px 0 5px rgba(30, 30, 28, 0.08);
  }

  .ranking th:first-child {
    z-index: 2;
    background: var(--bg-alt);
  }

  .ranking td:first-child {
    background: var(--surface);
  }

  .ranking-podium-1 td:first-child { background: #fbf5e7; }
  .ranking-podium-2 td:first-child { background: #f3f4f5; }
  .ranking-podium-3 td:first-child { background: #f8efe8; }

  .ranking th {
    font-size: 10px;
    line-height: 1.2;
  }

  .ranking-points strong {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .ranking-col-position { width: calc(12vw - 3.84px); }
  .ranking-col-bird { width: calc(26vw - 8.32px); }
  .ranking-col-owner { width: calc(34vw - 10.88px); }
  .ranking-col-points { width: calc(28vw - 8.96px); }
}

.users-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
  width: 100%;
  min-width: 0;
}
.users-actions > .btn,
.users-actions > .profile-form {
  width: 100%;
}
.users-actions > span {
  display: block;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}
.users-actions > .profile-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}
.users-actions > .profile-form select,
.users-actions > .profile-form .btn,
.users-actions > .btn {
  width: 100%;
  min-height: 34px;
  justify-content: center;
}

.home-image-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.home-image-admin-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-image-admin-card h2,
.home-image-admin-card p {
  margin: 0;
}
.home-image-admin-preview,
.home-image-admin-empty {
  display: grid;
  width: 100%;
  height: 220px;
  place-items: center;
  object-fit: contain;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
}
.home-image-admin-empty {
  padding: 16px;
  color: var(--text);
  text-align: center;
}
.home-image-admin-form {
  display: grid;
  gap: 10px;
  margin-top: auto;
}
.home-award {
  padding-block: 24px 56px;
  text-align: center;
}
.home-award h2 {
  margin: 0 0 24px;
}
.home-award img {
  display: block;
  width: min(100%, 1040px);
  max-height: 680px;
  margin-inline: auto;
  object-fit: contain;
}
