:root {
  /* Tom exato das bordas amostradas de mascote-login.jpg (#041728) para fusão 100% invisível */
  --ns-canvas: #041728;
  --ns-canvas-mid: #061b2f;
  --ns-canvas-right: #09223b;
  --ns-ink: #0b192c;
  --ns-ink-soft: #24384f;
  --ns-muted: #54667d;
  --ns-cyan: #007d96;
  --ns-cyan-hover: #00667d;
  --ns-cyan-bright: #22cde6;
  --ns-cyan-ice: #7ee3f5;
  --ns-gold: #d4af37;
  --ns-border: #ccd9e6;
  --ns-border-soft: #e6edf4;
  --ns-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --ns-serif: "Newsreader", Georgia, serif;
  --ns-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--ns-canvas);
  color: #f2f7fc;
  font: 15px/1.5 var(--ns-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   Palco Unificado com Fusão Exata ao Pixel (#041728) e Composição GPU
   ========================================================================== */
.login-stage {
  position: relative;
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow-x: hidden;
  /* Esquerda mantém exatamente #041728 para a mascote flutuar sem nenhuma costura;
     direita abre suavemente uma atmosfera profunda atrás do card branco */
  background:
    radial-gradient(680px 540px at 80% 50%, rgba(0, 163, 196, 0.13), transparent 66%),
    radial-gradient(480px 380px at 76% 18%, rgba(212, 175, 55, 0.065), transparent 68%),
    linear-gradient(108deg, var(--ns-canvas) 0%, var(--ns-canvas) 46%, var(--ns-canvas-mid) 74%, var(--ns-canvas-right) 100%);
}

/* Grade arquitetônica científica ultra-sutil (padrão Linear/Vercel) */
.login-grid-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(126, 227, 245, 0.14) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.28;
  -webkit-mask-image: radial-gradient(ellipse 68% 68% at 76% 50%, #000 0%, rgba(0, 0, 0, 0.25) 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 68% 68% at 76% 50%, #000 0%, rgba(0, 0, 0, 0.25) 55%, transparent 100%);
}

/* Luz atmosférica GPU conectando a energia da mascote ao card flutuante */
.login-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(540px 400px at 56% 56%, rgba(34, 205, 230, 0.075), transparent 65%),
    radial-gradient(440px 360px at 78% 52%, rgba(0, 163, 196, 0.11), transparent 64%);
  will-change: opacity;
  animation: ambientPulse 9s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
  0% { opacity: 0.78; }
  100% { opacity: 1; }
}

@keyframes floatGentle {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -6px, 0); }
}

/* Topbar minimalista */
.login-topbar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px clamp(20px, 4vw, 48px) 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.login-brand:focus-visible {
  outline: 2px solid var(--ns-cyan-bright);
  outline-offset: 6px;
  border-radius: 10px;
}

.login-brand-symbol {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(212, 175, 55, 0.25));
}

.login-brand-wordmark {
  height: 14px;
  width: auto;
  display: block;
  object-fit: contain;
  opacity: 0.96;
}

.login-top-link {
  font-size: 13px;
  font-weight: 600;
  color: rgba(203, 224, 240, 0.86);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.login-top-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(126, 227, 245, 0.34);
}

/* ==========================================================================
   Composição Central (2 colunas harmônicas em proporção áurea visual)
   ========================================================================== */
.login-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(14px, 2.6vh, 30px) clamp(20px, 4vw, 48px) clamp(24px, 3.6vh, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(355px, 420px);
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
}

/* ---------- Coluna Esquerda: Narrativa acima + Mascote sem caixa ---------- */
.login-showcase {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.login-copy {
  max-width: 560px;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ns-cyan-ice);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.85);
  display: inline-block;
}

.login-headline {
  margin: 0 0 9px;
  font-size: clamp(28px, 2.95vw, 42px);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.032em;
  color: #ffffff;
}

.login-headline em {
  font-family: var(--ns-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--ns-cyan-ice);
  letter-spacing: -0.01em;
}

.login-subtitle {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(206, 224, 240, 0.82);
  max-width: 50ch;
}

/* Palco da mascote: WebP RGBA com transparência real — flutua livremente sobre qualquer degradê */
.login-art-frame {
  margin: 0 0 0 -18px;
  position: relative;
  width: calc(100% + 52px);
  aspect-ratio: 16 / 9;
  max-height: 370px;
  overflow: visible;
  pointer-events: none;
  will-change: transform;
  animation: floatGentle 7.5s ease-in-out infinite;
}

.login-art-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 12px 32px rgba(0, 163, 196, 0.16));
}

.login-trust-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12.5px;
  font-weight: 550;
  color: rgba(176, 206, 228, 0.82);
}

.login-trust-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-trust-line svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ns-cyan-ice);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.trust-sep {
  opacity: 0.45;
}

/* ---------- Coluna Direita: Card Flutuante com Acabamento Editorial ---------- */
.login-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.login-card {
  position: relative;
  width: 100%;
  background: #ffffff;
  color: var(--ns-ink);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: clamp(24px, 2.5vw, 32px);
  box-shadow:
    0 32px 78px -18px rgba(1, 8, 16, 0.82),
    0 12px 28px -10px rgba(1, 10, 20, 0.48),
    0 0 0 1px rgba(126, 227, 245, 0.16),
    0 0 70px -22px rgba(0, 163, 196, 0.30);
  overflow: hidden;
}

/* Filete luminoso sutil no topo do card ecoando os fios ciano-dourados da mascote */
.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #00a3c4 0%, #38bdf8 52%, #d4af37 100%);
  opacity: 0.9;
}

.login-card-head {
  margin-bottom: 18px;
}

.login-card-kicker {
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ns-cyan);
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: clamp(23px, 1.9vw, 28px);
  font-weight: 780;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--ns-ink);
}

.login-card-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ns-muted);
}

/* Abas segmentadas do formulário */
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #edf3f8;
  border: 1px solid #dde7f0;
}

.login-tab-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #4c6078;
  font: 600 13.5px/1.2 var(--ns-ui);
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.login-tab-btn:hover:not(.active) {
  color: var(--ns-ink);
  background: rgba(255, 255, 255, 0.58);
}

.login-tab-btn.active {
  background: #ffffff;
  color: #00667d;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(11, 25, 44, 0.1), 0 4px 10px -4px rgba(11, 25, 44, 0.12);
}

/* Campos do formulário */
.login-form,
.login-field-group {
  display: grid;
  gap: 14px;
}

.login-field {
  display: grid;
  gap: 6px;
}

.login-card label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ns-ink-soft);
}

.login-optional {
  font-weight: 500;
  color: #708299;
}

.login-card input[type="text"],
.login-card input[type="password"],
.login-card select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1.5px solid var(--ns-border);
  background: #fbfdff;
  color: var(--ns-ink);
  font: 500 15px/1.35 var(--ns-ui);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.login-card select {
  cursor: pointer;
}

#novoOrcid {
  font-family: var(--ns-mono);
  font-size: 14px;
}

.login-card input::placeholder {
  color: #8496ab;
  font-weight: 450;
}

.login-card input:hover,
.login-card select:hover {
  border-color: #93b3cc;
  background-color: #ffffff;
}

.login-card input:focus,
.login-card select:focus {
  outline: none;
  border-color: var(--ns-cyan);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 125, 150, 0.14);
}

.login-hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #5c7087;
}

.login-card .erro {
  margin: 2px 0 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 3.5px solid #dc2626;
  color: #991b1b;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.login-submit {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #00829c 0%, #00667d 100%);
  color: #ffffff;
  font: 700 15px/1 var(--ns-ui);
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow:
    0 10px 22px -8px rgba(0, 114, 138, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.15s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.login-submit:hover {
  filter: brightness(1.06);
  transform: translate3d(0, -1px, 0);
  box-shadow:
    0 14px 28px -10px rgba(0, 114, 138, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.login-submit:active {
  transform: translate3d(0, 0, 0);
}

.login-card-security {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--ns-border-soft);
  font-size: 12px;
  color: #62758c;
  line-height: 1.35;
}

.login-card-security svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: #059669;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 24px;
    padding-top: 12px;
  }

  .login-panel {
    order: 1;
    justify-content: center;
    max-width: 440px;
  }

  .login-showcase {
    order: 2;
    max-width: 540px;
    text-align: center;
    align-items: center;
  }

  .login-art-frame {
    margin: 0;
    width: 100%;
  }

  .login-art-img {
    object-position: center center;
  }

  .login-trust-line {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .login-topbar {
    padding: 16px 16px 4px;
  }
  .login-top-link {
    display: none;
  }
  .login-card {
    padding: 22px 18px;
    border-radius: 18px;
  }
  .login-card input[type="text"],
  .login-card input[type="password"],
  .login-card select {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-art-frame,
  .login-ambient {
    animation: none !important;
  }
}
