:root {
  --bg: #051012;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #071113;
  --muted: #52606a;
  --green: #3d8f24;
  --green-dark: #145e2d;
  --navy: #06202c;
  --orange: #f6a400;
  --line: rgba(255, 255, 255, 0.25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(4, 17, 18, 0.86), rgba(4, 17, 18, 0.18)),
    url("/public/assets/zap-flags-world.png") center / cover no-repeat,
    var(--bg);
  color: #ffffff;
}

.home-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 18px;
}

.home-topbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
}

.home-topbar img {
  width: 42px;
  height: 42px;
}

.hero {
  width: min(100%, 620px);
  align-self: center;
  display: grid;
  gap: 34px;
  margin-left: min(6vw, 72px);
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-brand img {
  width: clamp(72px, 12vw, 116px);
  height: clamp(72px, 12vw, 116px);
}

h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

p {
  margin: 8px 0 0;
  color: #ffffff;
  font-size: clamp(1rem, 2.5vw, 1.45rem);
  font-weight: 650;
}

button,
a.choice-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 14px 18px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  display: none;
}

.choice-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(100%, 470px);
}

.choice-button {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 172px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.choice-button span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  font-size: 1.35rem;
}

.player-choice span {
  background: rgba(61, 143, 36, 0.12);
  color: var(--green);
}

.company-choice span {
  background: rgba(6, 32, 44, 0.1);
  color: #0c5d8f;
}

.choice-button strong {
  color: inherit;
  font-size: 1.12rem;
  font-weight: 900;
}

.choice-button small {
  max-width: 13rem;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}

.choice-button:hover {
  transform: translateY(-2px);
}

.hidden {
  display: none;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(3, 16, 20, 0.38);
  backdrop-filter: blur(8px);
}

.loading-overlay.hidden {
  display: none !important;
}

.loading-overlay:not(.hidden)::before {
  content: "";
  position: absolute;
  width: min(230px, calc(100vw - 48px));
  height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(5, 16, 18, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.loading-overlay > * {
  position: relative;
  z-index: 1;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 48px;
  border: 3px solid rgba(255, 255, 255, 0.32);
  border-top-color: var(--green);
  border-radius: 999px;
  animation: loading-spin 900ms linear infinite;
}

.loading-overlay strong {
  position: absolute;
  margin-top: 48px;
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: 0;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-link {
  display: grid;
  justify-items: center;
  padding: 16px 0 4px;
}

.test-maintenance-link { margin-bottom: 10px; min-height: auto; padding: 6px 10px; background: transparent; color: rgba(255,255,255,.72); font-size: .78rem; }
.maintenance-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 18px; background: rgba(3,16,20,.72); backdrop-filter: blur(8px); }
.maintenance-modal.hidden { display: none; }
.maintenance-card { position: relative; width: min(520px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 24px; border-radius: 10px; background: #fff; color: #071113; box-shadow: 0 25px 80px rgba(0,0,0,.4); }
.maintenance-card h2 { margin: 0 38px 20px 0; font-size: 1.15rem; }
.maintenance-close { position: absolute; top: 10px; right: 10px; min-height: 36px; padding: 4px 10px; background: transparent; color: #071113; font-size: 1.5rem; }
.maintenance-card label { display: grid; gap: 6px; margin: 12px 0; font-weight: 700; }
.maintenance-card input { min-height: 44px; padding: 10px; border: 1px solid #aab4ba; border-radius: 6px; }
.maintenance-actions, .maintenance-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.maintenance-grid { display: grid; grid-template-columns: 1fr 1fr; }
.maintenance-card button { background: #145e2d; color: #fff; }
.maintenance-card button:disabled { cursor: not-allowed; background: #68777d; opacity: .72; }
.maintenance-stats { display: grid; gap: 6px; margin: 0 0 18px; }
.maintenance-stats div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px dotted #aab4ba; }
.maintenance-stats dd { margin: 0; font-weight: 900; }
.maintenance-migrations { margin: 18px 0; padding: 14px 0; border-top: 1px solid #d7dee1; border-bottom: 1px solid #d7dee1; }
.maintenance-migrations h3 { margin: 0 0 10px; }
.maintenance-migrations-list { margin: 10px 0; font-size: .88rem; }
.maintenance-migrations-list h4 { margin: 12px 0 4px; }
.maintenance-migrations-list ul { margin: 0; padding-left: 22px; }
.maintenance-migrations-list h5 { margin: 10px 0 4px; }
.maintenance-migrations-list section { padding: 6px 0; }
.maintenance-migrations-list section + section { border-top: 1px dashed #d7dee1; }
.maintenance-plan-status { padding: 10px; border-radius: 6px; background: #fff4cc; color: #5b4300; font-weight: 700; }
.maintenance-audit-warning { padding: 10px; border: 1px solid #b7791f; border-radius: 6px; background: #fff8df; color: #6b4300; }
.maintenance-message { color: #145e2d; font-size: .9rem; }
.maintenance-message.error { color: #b91c1c; }

.admin-link a {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  text-decoration: none;
}

@media (max-width: 700px) {
  .home-shell {
    padding: 14px;
  }

  .hero {
    margin: 0;
    justify-items: center;
    text-align: center;
  }

  .hero-brand {
    display: grid;
    justify-items: center;
  }

  .choice-panel {
    grid-template-columns: 1fr;
  }
}

/* 017-141 - página de entrada alinhada com o novo portal */
:root {
  --home-ink: #10221d;
  --home-muted: #64736d;
  --home-green: #36942f;
  --home-green-dark: #1f6e2c;
  --home-orange: #f0a000;
  --home-line: rgba(31, 77, 59, 0.14);
}

body {
  background:
    linear-gradient(104deg, rgba(244, 249, 244, 0.97) 0%, rgba(239, 247, 239, 0.91) 46%, rgba(21, 73, 62, 0.77) 100%),
    url("/public/assets/zap-flags-world.png?v=017-143") center / cover no-repeat fixed,
    #eef5ef;
  color: var(--home-ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.88), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(17, 50, 43, 0.08));
}

.home-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 38px) clamp(20px, 5vw, 72px) 20px;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  padding: 10px 14px 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 50px rgba(23, 65, 50, 0.10);
  backdrop-filter: blur(18px);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--home-ink);
  text-decoration: none;
}

.home-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.home-brand span {
  display: grid;
  gap: 1px;
}

.home-brand strong {
  color: var(--home-ink);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.home-brand small {
  color: var(--home-green);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 13px;
  border: 1px solid rgba(55, 148, 47, 0.16);
  border-radius: 999px;
  background: rgba(55, 148, 47, 0.07);
  color: #3f5b50;
  font-size: 0.78rem;
  font-weight: 750;
}

.home-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4dbb46;
  box-shadow: 0 0 0 4px rgba(77, 187, 70, 0.13);
}

.hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.78fr);
  align-items: center;
  gap: clamp(48px, 8vw, 118px);
  margin: 0;
  padding: clamp(50px, 7vh, 88px) clamp(8px, 2vw, 26px) 34px;
}

.hero-copy {
  max-width: 690px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--home-green-dark);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.hero-eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--home-orange);
}

.hero h1 {
  margin: 0;
  color: var(--home-ink);
  font-size: clamp(3.7rem, 7vw, 6.8rem);
  font-weight: 860;
  line-height: 0.91;
  letter-spacing: -0.065em;
}

.hero h1 span {
  color: var(--home-green);
}

.hero-lead {
  max-width: 590px;
  margin: 26px 0 0;
  color: #53675f;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 540;
  line-height: 1.62;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 30px;
}

.hero-features span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #40564d;
  font-size: 0.84rem;
  font-weight: 760;
}

.hero-features i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--home-orange);
}

.portal-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 32px 90px rgba(8, 43, 34, 0.28);
  backdrop-filter: blur(22px);
}

.portal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--home-green) 0 72%, var(--home-orange) 72%);
}

.portal-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-card-heading img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.portal-card-heading div {
  display: grid;
  gap: 3px;
}

.portal-card-heading small,
.choice-copy small {
  color: #82918b;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.portal-card-heading strong {
  color: var(--home-ink);
  font-size: 1rem;
  letter-spacing: 0.045em;
}

.portal-intro {
  margin: 26px 0 17px;
  color: #687972;
  font-size: 0.92rem;
  font-weight: 650;
}

.choice-panel {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

a.choice-button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-items: stretch;
  gap: 16px;
  width: 100%;
  min-height: 98px;
  padding: 15px 18px;
  border: 1px solid var(--home-line);
  border-radius: 18px;
  background: #f8fbf8;
  box-shadow: none;
  color: var(--home-ink);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

a.choice-button:hover,
a.choice-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(55, 148, 47, 0.42);
  box-shadow: 0 15px 34px rgba(34, 97, 67, 0.12);
  outline: none;
}

.choice-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px;
}

.choice-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.player-choice .choice-icon {
  background: rgba(55, 148, 47, 0.11);
  color: var(--home-green);
}

.company-choice .choice-icon {
  background: rgba(15, 73, 75, 0.09);
  color: #185e61;
}

a.choice-button .choice-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  justify-items: start;
}

a.choice-button .choice-copy strong {
  color: var(--home-ink);
  font-size: 1.17rem;
  font-weight: 850;
}

a.choice-button .choice-copy small {
  max-width: none;
  width: auto;
  height: auto;
  color: #82918b;
  text-align: left;
}

a.choice-button .choice-copy em {
  overflow: hidden;
  color: #697a73;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-button b {
  justify-self: end;
  color: #a2afa9;
  font-size: 1.32rem;
  font-weight: 500;
}

.portal-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 19px 0 0;
  color: #82918b;
  font-size: 0.72rem;
  font-weight: 680;
}

.portal-note span {
  color: var(--home-green);
  font-weight: 900;
}

.home-top-actions { display: flex; align-items: center; gap: 12px; }
.home-help-link,
.first-register-help {
  color: var(--home-green-dark);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}
.home-help-link { border: 1px solid rgba(32, 92, 53, .20); border-radius: 10px; background: #fff; padding: 9px 12px; }
.first-register-help { display: block; margin-top: 17px; text-align: center; text-decoration: underline; text-underline-offset: 3px; }

.admin-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 8px 0;
}

.admin-link a,
.test-maintenance-link {
  color: rgba(34, 62, 52, 0.68);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 48px;
  }

  .hero-copy {
    text-align: center;
    margin: 0 auto;
  }

  .hero-eyebrow,
  .hero-features {
    justify-content: center;
  }

  .portal-card {
    width: min(560px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .home-shell {
    padding: 12px;
  }

  .home-topbar {
    min-height: 62px;
    border-radius: 17px;
  }

  .home-brand img {
    width: 40px;
    height: 40px;
  }

  .home-status {
    display: none;
  }

  .hero {
    padding: 44px 3px 22px;
  }

  .hero h1 {
    font-size: clamp(3.15rem, 16vw, 4.6rem);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-features {
    gap: 10px 15px;
  }

  .portal-card {
    padding: 26px 18px;
    border-radius: 24px;
  }

  a.choice-button {
    grid-template-columns: auto 1fr;
    min-height: 92px;
    padding: 13px;
  }

  .choice-button b {
    display: none;
  }

  .choice-copy em {
    white-space: normal;
  }

  .admin-link {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* 020-3: contraste tipografico por fundo real nas paginas publicas. */
.home-shell,
.maintenance-card {
  color: #111111 !important;
  font-weight: 700 !important;
}
.home-shell :is(h1, h2, h3, h4, h5, h6, p, span, small, strong, b, em, label, a, button, input, textarea, select, option, li, dt, dd, th, td),
.maintenance-card :is(h1, h2, h3, h4, h5, h6, p, span, small, strong, b, em, label, a, button, input, textarea, select, option, li, dt, dd, th, td) {
  color: #111111 !important;
  font-weight: 700 !important;
}
.home-shell .admin-link,
.home-shell .test-maintenance-link,
.loading-overlay {
  color: #ffffff !important;
  font-weight: 400 !important;
}
.home-shell .admin-link :is(h1, h2, h3, p, span, small, strong, b, em, a, button),
.loading-overlay :is(h1, h2, h3, p, span, small, strong, b, em) {
  color: #ffffff !important;
  font-weight: 400 !important;
}
.home-shell .hero-copy,
.home-shell .hero-copy :is(h1, h2, h3, p, span, small, strong, b, em, a, button) {
  color: #111111 !important;
  font-weight: 700 !important;
}
.maintenance-card button:not(.maintenance-close) {
  color: #ffffff !important;
  font-weight: 400 !important;
}
