/* ============================================================
   Portal DevOps — padrão visual Valid (branco + azul)
   Azul da marca: #131bff (mesmo usado no projeto ACME)
   ============================================================ */
:root {
  --brand: #131bff;
  --brand-hover: #0b12ca;
  --brand-soft: #eef0ff;
  --ring: #7378ff;

  --page: #fbfafe;
  --surface: #ffffff;
  --surface-soft: #f4f5ff;
  --text: #01010c;
  --muted: #535770;
  --border: #dedff0;

  --ok: #12a150;
  --interno: #b7791f;
  --embreve: #7b7f96;
  --pendente: #d92d20;

  --radius: 14px;
  --sombra: 0 1px 2px rgba(1,1,12,.04), 0 8px 24px rgba(19,27,255,.05);
}

* { box-sizing: border-box; }

/* Regra explícita: uma classe com display (ex.: .entrada { display: grid })
   vence o [hidden] do navegador, e a tela de entrada aparecia junto com o
   portal depois do login. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0 0 .4rem; line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: 2rem; font-weight: 750; }
h2 { font-size: 1.2rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.centro { text-align: center; margin: 1.25rem 0; }

.logo-valid { height: 22px; width: auto; color: var(--brand); display: block; }

/* ============================================================
   ENTRADA — fundo futurístico
   ============================================================ */
.entrada {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 4rem;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1100px 520px at 50% -10%, #dfe6ff 0%, transparent 62%),
    linear-gradient(165deg, #ffffff 0%, #f2f5ff 38%, #e2e9ff 100%);
}

/* camada de céu: auroras, malha, orbes e varredura */
.ceu { position: absolute; inset: 0; z-index: -1; overflow: hidden; }

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  opacity: .9;
  will-change: transform;
}
.a1 {
  width: 46vw; height: 46vw; min-width: 380px; min-height: 380px;
  left: -8vw; top: -12vw;
  background: radial-gradient(circle, rgba(19,27,255,.70), rgba(19,27,255,0) 72%);
  animation: flutuar1 22s ease-in-out infinite;
}
.a2 {
  width: 40vw; height: 40vw; min-width: 320px; min-height: 320px;
  right: -6vw; top: 4vh;
  background: radial-gradient(circle, rgba(56,182,255,.62), rgba(56,182,255,0) 72%);
  animation: flutuar2 26s ease-in-out infinite;
}
.a3 {
  width: 52vw; height: 34vw; min-width: 340px; min-height: 240px;
  left: 22vw; bottom: -16vh;
  background: radial-gradient(circle, rgba(77,92,255,.60), rgba(77,92,255,0) 74%);
  animation: flutuar3 30s ease-in-out infinite;
}

/* malha em perspectiva, sumindo no horizonte */
.malha {
  position: absolute;
  inset: -30% -20% -12% -20%;
  background-image:
    linear-gradient(to right, rgba(19,27,255,.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(19,27,255,.22) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(560px) rotateX(60deg) scale(1.7);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to bottom, transparent 22%, #000 52%, rgba(0,0,0,.25) 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 22%, #000 52%, rgba(0,0,0,.25) 100%);
  animation: deslizar 14s linear infinite;
}

.orbe {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff, rgba(19,27,255,.85) 62%, rgba(19,27,255,.15));
  box-shadow: 0 0 26px rgba(19,27,255,.45);
  opacity: .72;
}
.o1 { width: 9px;  height: 9px;  left: 18%;  top: 26%; animation: subir 17s linear infinite; }
.o2 { width: 6px;  height: 6px;  right: 22%; top: 18%; animation: subir 23s linear infinite 3s; }
.o3 { width: 12px; height: 12px; left: 72%;  top: 62%; animation: subir 29s linear infinite 6s; }

.vinheta {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 54% at 50% 46%, rgba(255,255,255,.92) 0%, rgba(255,255,255,.55) 46%, rgba(255,255,255,0) 74%);
}

.horizonte {
  position: absolute;
  left: -10%; right: -10%;
  top: 62%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(19,27,255,.55), rgba(88,196,255,.75), rgba(19,27,255,.55), transparent);
  filter: blur(1.5px);
  box-shadow: 0 0 26px 6px rgba(19,27,255,.28);
  opacity: .8;
}

.varredura {
  position: absolute;
  left: 0; right: 0; top: -30%;
  height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(19,27,255,.10), transparent);
  animation: varrer 11s ease-in-out infinite;
}

@keyframes flutuar1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(6vw,4vh) scale(1.08); } }
@keyframes flutuar2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5vw,6vh) scale(1.1); } }
@keyframes flutuar3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4vw,-5vh) scale(1.06); } }
@keyframes deslizar { from { background-position: 0 0, 0 0; } to { background-position: 0 56px, 0 56px; } }
@keyframes subir   { 0% { transform: translateY(0) scale(1); opacity: 0; } 15% { opacity: .55; } 85% { opacity: .35; } 100% { transform: translateY(-42vh) scale(.7); opacity: 0; } }
@keyframes varrer  { 0% { top: -35%; } 60%,100% { top: 115%; } }

/* cartão de entrada */
.entrada-conteudo::before {
  content: "";
  position: absolute;
  inset: -46px -30px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(19,27,255,.20), rgba(19,27,255,0) 68%);
  filter: blur(26px);
}

.entrada-conteudo {
  position: relative;
  width: 100%;
  max-width: 560px;
  text-align: center;
  padding: 3rem 2.5rem 2.6rem;
  border-radius: 26px;
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid rgba(19,27,255,.13);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 30px 70px rgba(19,27,255,.14),
    0 2px 8px rgba(1,1,12,.04);
}

.marca { display: inline-flex; margin-bottom: 1.6rem; }
.marca .logo-valid { height: 28px; }

.entrada h1 {
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -.035em;
  margin-bottom: .85rem;
}
.grad {
  background: linear-gradient(100deg, #131bff 0%, #4d5cff 42%, #58c4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.entrada-sub {
  margin: 0 auto 2rem;
  max-width: 40ch;
  color: var(--muted);
  font-size: .98rem;
}

.btn-entrar {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.5rem;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font-weight: 650;
  font-size: .95rem;
  box-shadow: 0 10px 24px rgba(19,27,255,.32), 0 1px 0 rgba(255,255,255,.25) inset;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn-entrar:hover {
  background: var(--brand-hover);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(19,27,255,.38);
}
.btn-entrar:active { transform: translateY(0); }

.entrada-nota {
  margin: 1.5rem 0 0;
  font-size: .8rem;
  color: var(--muted);
}
.entrada-nota b { color: var(--text); font-weight: 600; }

.entrada-pe {
  position: absolute;
  left: 0; right: 0; bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8d92ab;
}
.pulso {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(19,27,255,.55);
  animation: pulsar 2.4s ease-out infinite;
}
@keyframes pulsar {
  0%   { box-shadow: 0 0 0 0 rgba(19,27,255,.5); }
  70%  { box-shadow: 0 0 0 9px rgba(19,27,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(19,27,255,0); }
}

/* Entrada do cartão.
   Sem fill-mode de propósito: com `animation-fill-mode: both` o conteúdo fica
   em opacity:0 enquanto a animação está no atraso — e se a aba estiver em
   segundo plano o navegador não avança a animação, deixando o cartão VAZIO.
   Sem fill-mode o estado base é visível; a animação é só enfeite. */
.entrando { animation: none; }
.entrada-conteudo { animation: surgir .55s cubic-bezier(.2,.7,.3,1); }
/* Só transform. Nada de animar opacity na entrada: se o navegador pausar a
   animação (aba em segundo plano, captura headless), opacity 0 deixaria a tela
   em branco — foi exatamente o que aconteceu em produção. Com transform o
   conteúdo nunca fica invisível. */
@keyframes surgir {
  from { transform: translateY(10px); }
  to   { transform: none; }
}

/* ============================================================
   PORTAL — padrão branco/azul
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1.5rem;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .8rem; font-size: .93rem; }
.brand strong { font-weight: 650; }
.divisor { width: 1px; height: 18px; background: var(--border); }
.topbar-right { display: flex; align-items: center; gap: .9rem; }
.user { color: var(--muted); font-size: .84rem; }

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4rem;
}

.hero { margin-bottom: 1.9rem; }
.hero h1 { font-size: 1.85rem; }
.hero p { margin: 0 0 1.15rem; font-size: .93rem; }

.search-wrap { position: relative; margin-bottom: 1rem; }
.search-icon {
  position: absolute;
  left: .95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: #9aa0b8;
  pointer-events: none;
}
#busca {
  width: 100%;
  padding: .85rem 1rem .85rem 2.7rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .95rem;
  outline: none;
  box-shadow: var(--sombra);
  transition: border-color .15s, box-shadow .15s;
}
#busca::placeholder { color: #9aa0b8; }
#busca:focus { border-color: var(--ring); box-shadow: 0 0 0 4px rgba(19,27,255,.10); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  padding: .36rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: #b9bce0; }
.chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(19,27,255,.24);
}

.catalogo { display: grid; gap: 1.9rem; }
.grupo > h3 {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand);
  margin: 0 0 .15rem;
  font-weight: 700;
}
.grupo > .grupo-desc { margin: 0 0 .85rem; font-size: .82rem; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .85rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 1.05rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  box-shadow: var(--sombra);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(19,27,255,.35);
  box-shadow: 0 12px 30px rgba(19,27,255,.13);
  text-decoration: none;
}
.card.bloqueado { cursor: default; opacity: .72; background: var(--surface-soft); }
.card.bloqueado:hover { transform: none; border-color: var(--border); box-shadow: var(--sombra); }

.card-top { display: flex; align-items: center; gap: .6rem; }
.card-titulo { font-weight: 650; font-size: .94rem; flex: 1; min-width: 0; }
.card-desc { color: var(--muted); font-size: .83rem; margin: 0; flex: 1; }
.card-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .3rem; }

.monogram {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 750;
  font-size: .8rem;
  flex: none;
}

.badge {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 750;
  padding: .13rem .42rem;
  border-radius: 5px;
  border: 1px solid currentColor;
  background: #fff;
}
.badge.dev { color: #131bff; }
.badge.hml { color: #7c3aed; }
.badge.prd { color: #d92d20; }

.tag {
  font-size: .69rem;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .1rem .38rem;
}

.selo { display: inline-flex; align-items: center; gap: .35rem; font-size: .73rem; color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.dot.ok       { background: var(--ok);      box-shadow: 0 0 0 3px rgba(18,161,80,.14); }
.dot.interno  { background: var(--interno); box-shadow: 0 0 0 3px rgba(183,121,31,.14); }
.dot.em-breve { background: var(--embreve); }
.dot.pendente { background: var(--pendente); box-shadow: 0 0 0 3px rgba(217,45,32,.12); }

.empty { text-align: center; color: var(--muted); padding: 2.5rem 0; }

/* ---------- feedback ---------- */
.feedback {
  margin-top: 3.5rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--sombra);
}
.feedback h2 { font-size: 1.08rem; }
.feedback p { margin: 0 0 1.1rem; font-size: .87rem; }

.radios { display: flex; gap: 1.4rem; margin-bottom: .8rem; font-size: .87rem; color: var(--muted); }
.radios label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.radios input { accent-color: var(--brand); }

#mensagem {
  width: 100%;
  padding: .8rem .95rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
#mensagem:focus { background: #fff; border-color: var(--ring); box-shadow: 0 0 0 4px rgba(19,27,255,.10); }

.feedback-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .8rem;
}
.status { font-size: .84rem; }
.status.ok   { color: var(--ok); }
.status.erro { color: var(--pendente); }

.btn-primary {
  padding: .6rem 1.4rem;
  border-radius: 10px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 650;
  font-size: .88rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(19,27,255,.24);
  transition: background .15s, transform .15s;
}
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  padding: .42rem .9rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.btn-ghost:hover { color: var(--brand); border-color: rgba(19,27,255,.4); text-decoration: none; }

.rodape { margin-top: 2.5rem; text-align: center; color: #9aa0b8; font-size: .78rem; }

@media (max-width: 560px) {
  .entrada-conteudo { padding: 2.2rem 1.4rem 2rem; border-radius: 20px; }
  .hero h1 { font-size: 1.5rem; }
  main { padding: 1.6rem 1rem 3rem; }
  .feedback { padding: 1.2rem; }
  .feedback-foot { flex-direction: column; align-items: stretch; }
  .feedback-foot .btn-primary { width: 100%; }
  .entrada-pe { font-size: .66rem; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora, .malha, .orbe, .varredura, .pulso, .entrando { animation: none !important; }
  .btn-entrar:hover, .card:hover { transform: none; }
}
