/* Variáveis globais (cores, fontes) ficam em base.css */

body {
  min-height: 100vh;
  background: var(--escuro);
  position: relative;
  overflow-x: hidden;
}

/* Imagem institucional de fundo + camada escura por cima p/ manter contraste do card */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,20,20,0.55) 0%, rgba(10,20,20,0.72) 100%),
    url("../img/fundo de tela - Editada.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,74,74,0.18) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Aba com fundo verde: grid de 3 colunas garante o texto sempre centralizado,
   independente do tamanho de cada ícone nas laterais */
.topo-logo {
  position: relative;
  width: 340px;
  margin: 0 auto;
  background: var(--verde);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
}

.icone-tg {
  width: 38px;
  height: 38px;
  object-fit: contain;
  justify-self: start;
}

.icone-extra {
  width: 24px;
  height: 24px;
  color: rgba(255,255,255,0.85);
  justify-self: end;
}

.logo-texto {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  justify-self: center;
  text-align: center;
}
.logo-sub { font-size: 10px; letter-spacing: 1.5px; color: rgba(255,255,255,0.65); font-weight: 600; font-family: var(--fonte-titulo); }
.logo-titulo { font-size: 17px; font-weight: 700; color: #fff; font-family: var(--fonte-titulo); }

/* Card central de login */
.login-container {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-card {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow:
    0 30px 60px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 40px rgba(0,74,74,0.15);
  overflow: hidden;
}

/* Linha diagonal no canto, ecoando as facetas do fundo */
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  background: linear-gradient(225deg, rgba(0,74,74,0.12) 0%, transparent 55%);
  pointer-events: none;
}

.barra-superior {
  height: 4px;
  background: linear-gradient(90deg, var(--verde), var(--verde-claro), var(--verde));
  background-size: 200% 100%;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.login-form { padding: 44px 40px 24px; }

.titulo-form {
  font-family: var(--fonte-titulo);
  font-size: 20px;
  font-weight: 600;
  color: var(--escuro2);
  text-align: center;
  padding: 28px 40px 0;
}

.erro { color: #b23a3a; font-size: 13px; margin-top: 4px; min-height: 16px; }

/* Campos com label flutuante */
.campo { position: relative; margin-bottom: 28px; }

.campo input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid #e4e6e9;
  padding: 10px 2px 8px;
  font-size: 15px;
  font-family: var(--fonte);
  color: var(--escuro2);
  outline: none;
  background: transparent;
}

.campo label {
  position: absolute;
  left: 2px;
  top: 12px;
  font-size: 15px;
  color: #adb1b8;
  pointer-events: none;
  transition: all 0.18s ease;
  font-family: var(--fonte);
}

.campo input:focus,
.campo input:not(:placeholder-shown) {
  border-bottom-color: var(--verde);
}

.campo input:focus + label,
.campo input:not(:placeholder-shown) + label {
  top: -14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--verde);
}

.btn-entrar {
  width: 100%;
  padding: 14px;
  background: var(--verde);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--fonte-titulo);
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-entrar:hover {
  background: var(--verde-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,74,74,0.35);
}

.btn-entrar:active { transform: translateY(0); }

.btn-seta { transition: transform 0.15s ease; }
.btn-entrar:hover .btn-seta { transform: translateX(3px); }

.login-rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px 20px;
  font-size: 13px;
}
.lembrar { display: flex; align-items: center; gap: 6px; color: var(--escuro2); cursor: pointer; }
.lembrar input { cursor: pointer; accent-color: var(--verde); }
.login-rodape a { color: var(--verde); text-decoration: none; font-weight: 500; }
.login-rodape a:hover { text-decoration: underline; }

.status-sistema {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 14px 0 20px;
  font-size: 12px;
  color: var(--texto-claro);
  border-top: 1px solid #f0f1f2;
  margin: 0 40px;
  font-family: var(--fonte-titulo);
  letter-spacing: 0.3px;
}

.status-ponto {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 0 0 rgba(0,74,74,0.5);
  animation: pulso 2s ease-out infinite;
}

@keyframes pulso {
  0% { box-shadow: 0 0 0 0 rgba(0,74,74,0.45); }
  70% { box-shadow: 0 0 0 7px rgba(0,74,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,74,74,0); }
}

/* ========================================================================== 
   TG Brain · acesso ao ecossistema
   Mantém a fotografia institucional e aproxima o login da linguagem do hub.
   ========================================================================== */
body {
  min-height: 100vh;
  overflow-x: hidden;
  color: #eaf7f3;
  background: #061718;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(90deg, rgba(4,20,21,.92) 0%, rgba(4,24,24,.77) 45%, rgba(4,18,19,.87) 100%),
    linear-gradient(180deg, rgba(3,19,20,.18), rgba(3,19,20,.72)),
    url("../img/fundo de tela - Editada.jpg") center/cover no-repeat;
  transform: scale(1.015);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(2,14,15,.7));
}

.login-cenario { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.login-grade { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(131,219,190,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(131,219,190,.12) 1px,transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(90deg,#000,transparent 76%); }
.login-luz { position: absolute; border-radius: 50%; filter: blur(2px); }
.login-luz-um { width: 620px; height: 620px; left: -260px; top: -240px; background: radial-gradient(circle,rgba(46,171,137,.2),transparent 68%); }
.login-luz-dois { width: 620px; height: 620px; right: -220px; bottom: -320px; background: radial-gradient(circle,rgba(59,149,133,.15),transparent 70%); }

.login-marca {
  width: min(1180px,calc(100% - 56px));
  height: 88px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
}
.login-marca-simbolo { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid rgba(130,226,193,.22); border-radius: 13px; background: linear-gradient(145deg,rgba(128,224,189,.16),rgba(128,224,189,.045)); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.login-marca-simbolo img { width: 25px; height: 25px; object-fit: contain; }
.login-marca-texto { display: flex; flex-direction: column; }
.login-marca-texto strong { color: #fff; font: 700 18px var(--fonte-titulo); letter-spacing: -.25px; }
.login-marca-texto small { margin-top: 2px; color: #789891; font: 500 9px var(--fonte); letter-spacing: .25px; }

.login-layout {
  width: min(1180px,calc(100% - 56px));
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(390px,.85fr);
  align-items: center;
  gap: clamp(55px,8vw,120px);
  margin: 0 auto;
  padding: 34px 0 62px;
}

.login-apresentacao { max-width: 640px; }
.login-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #83b5a8; font: 600 10px var(--fonte); letter-spacing: 1.3px; text-transform: uppercase; }
.login-eyebrow i { width: 19px; height: 1px; background: #67c9aa; box-shadow: 0 0 8px rgba(103,201,170,.65); }
.login-apresentacao h1 { max-width: 600px; margin-top: 20px; color: #f5fbf9; font: 700 clamp(48px,5.2vw,72px)/.98 var(--fonte-titulo); letter-spacing: -3.3px; text-shadow: 0 16px 38px rgba(0,0,0,.25); }
.login-apresentacao h1 em { color: #82d8ba; font-style: normal; }
.login-apresentacao > p { max-width: 555px; margin-top: 24px; color: #a5bdb8; font: 400 14px/1.75 var(--fonte); }

.login-conexoes { width: 455px; height: 164px; position: relative; margin-top: 31px; }
.conexao-no { position: absolute; display: flex; align-items: center; gap: 7px; color: #91aca6; font: 500 9px var(--fonte); }
.conexao-no i { width: 6px; height: 6px; border-radius: 50%; background: #65cba9; box-shadow: 0 0 9px #65cba9; }
.no-centro { left: 160px; top: 36px; width: 102px; height: 102px; flex-direction: column; justify-content: center; gap: 0; border: 1px solid rgba(128,224,189,.32); border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 25%,rgba(125,224,190,.27),rgba(8,62,58,.78) 70%); box-shadow: 0 0 0 13px rgba(91,202,166,.035),0 0 50px rgba(57,194,154,.19),inset 0 0 22px rgba(125,224,190,.11); }
.no-centro b { font: 700 20px var(--fonte-titulo); letter-spacing: -.7px; }
.no-centro small { margin-top: -2px; color: #8fd8c1; font: 700 7px var(--fonte); letter-spacing: 2px; }
.no-pessoas { left: 8px; top: 28px; }
.no-dados { right: 28px; top: 15px; }
.no-servicos { right: 2px; bottom: 8px; }
.conexao-linha { position: absolute; height: 1px; opacity: .42; transform-origin: left center; background: linear-gradient(90deg,transparent,#65cba9,transparent); }
.linha-a { width: 145px; left: 55px; top: 53px; transform: rotate(13deg); }
.linha-b { width: 145px; left: 248px; top: 58px; transform: rotate(-14deg); }
.linha-c { width: 175px; left: 245px; top: 106px; transform: rotate(18deg); }

.login-beneficios { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.login-beneficios span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; color: #829f99; background: rgba(3,24,24,.38); backdrop-filter: blur(8px); font-size: 9px; }
.login-beneficios i { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; color: #74d3b3; background: rgba(100,204,170,.1); font-style: normal; }

.login-card {
  width: 100%;
  max-width: 465px;
  position: relative;
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 24px;
  background: linear-gradient(145deg,rgba(248,255,252,.965),rgba(237,247,244,.935));
  box-shadow: 0 35px 85px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.72);
  color: #173d38;
  backdrop-filter: blur(18px);
}
.login-card::before { content: none; }
.login-card-brilho { width: 230px; height: 230px; position: absolute; right: -120px; top: -130px; border-radius: 50%; background: radial-gradient(circle,rgba(88,191,160,.23),transparent 70%); pointer-events: none; }
.login-card-topo { display: flex; align-items: center; justify-content: space-between; padding: 25px 30px 0; }
.login-selo { display: inline-flex; align-items: center; gap: 7px; color: #66817b; font: 600 8px var(--fonte); letter-spacing: .55px; text-transform: uppercase; }
.login-selo i { width: 6px; height: 6px; border-radius: 50%; background: #47be8e; box-shadow: 0 0 0 5px rgba(71,190,142,.1),0 0 8px rgba(71,190,142,.55); }
.login-card-icone { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid #d9e9e4; border-radius: 11px; color: #318a73; background: rgba(255,255,255,.58); }
.login-card-icone svg { width: 19px; height: 19px; }
.login-card-cabecalho { padding: 22px 30px 0; }
.login-card-eyebrow { color: #26836c; font: 700 9px var(--fonte); letter-spacing: .85px; text-transform: uppercase; }
.login-card-cabecalho h2 { margin-top: 9px; color: #113a35; font: 700 30px/1.05 var(--fonte-titulo); letter-spacing: -1.25px; }
.login-card-cabecalho p { margin-top: 10px; color: #758b86; font-size: 11px; line-height: 1.55; }

.login-form { padding: 25px 30px 24px; }
.campo { position: relative; margin-bottom: 17px; }
.campo label { display: block; position: static; margin-bottom: 7px; color: #44645e; font: 600 9px var(--fonte); pointer-events: auto; }
.campo input { width: 100%; height: 50px; padding: 0 47px 0 43px; border: 1px solid #d7e4e0; border-radius: 12px; outline: none; color: #173d38; background: rgba(255,255,255,.77); font: 500 11px var(--fonte); transition: border-color .17s,box-shadow .17s,background .17s; }
.campo input::placeholder { color: #9bacA8; font-weight: 400; }
.campo input:hover { border-color: #c4d8d2; background: #fff; }
.campo input:focus,.campo input:not(:placeholder-shown) { border-color: #43a98e; background: #fff; box-shadow: 0 0 0 4px rgba(50,160,132,.1); }
.campo-icone { width: 18px; height: 18px; display: grid; place-items: center; position: absolute; left: 15px; bottom: 16px; color: #78918b; pointer-events: none; }
.campo-icone svg { width: 18px; height: 18px; }
.campo:focus-within .campo-icone { color: #26866e; }
.campo-ver-senha { width: 34px; height: 34px; display: grid; place-items: center; position: absolute; right: 8px; bottom: 8px; border: 0; border-radius: 9px; color: #7c938e; background: transparent; cursor: pointer; }
.campo-ver-senha:hover { color: #1f8069; background: #edf6f3; }
.campo-ver-senha svg { width: 18px; height: 18px; }
.icone-olho-fechado { display: none; }
.campo-ver-senha.ativo .icone-olho-aberto { display: none; }
.campo-ver-senha.ativo .icone-olho-fechado { display: block; }

.login-opcoes { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 18px; }
.lembrar { display: flex; align-items: center; gap: 7px; color: #627a74; font-size: 9px; cursor: pointer; }
.lembrar input { width: 1px; height: 1px; position: absolute; opacity: 0; }
.lembrar-check { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #cbdcd7; border-radius: 5px; color: transparent; background: #fff; font-size: 10px; transition: .15s; }
.lembrar input:checked + .lembrar-check { border-color: #23846b; color: #fff; background: #23846b; }
.lembrar input:focus-visible + .lembrar-check { box-shadow: 0 0 0 3px rgba(35,132,107,.13); }
.login-opcoes a { color: #18775f; font: 600 9px var(--fonte); text-decoration: none; }
.login-opcoes a:hover { text-decoration: underline; }

.erro { min-height: 0; margin: -5px 0 12px; color: #a83f45; font-size: 9px; line-height: 1.45; }
.erro:not(:empty) { min-height: 34px; padding: 9px 11px; border: 1px solid #f0d3d5; border-radius: 9px; background: #fff3f3; }
.btn-entrar { width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(115deg,#0b5b52,#16806a 62%,#289778); box-shadow: 0 11px 25px rgba(15,101,84,.23); font: 700 11px var(--fonte-titulo); letter-spacing: .1px; cursor: pointer; transition: transform .16s,box-shadow .16s,filter .16s; }
.btn-entrar:hover { background: linear-gradient(115deg,#0a554c,#147661 62%,#248c70); transform: translateY(-2px); box-shadow: 0 15px 30px rgba(15,101,84,.28); }
.btn-entrar:active { transform: translateY(0); }
.btn-entrar:disabled { opacity: .72; cursor: wait; transform: none; }
.btn-seta { transition: transform .16s; }
.btn-entrar:hover .btn-seta { transform: translateX(3px); }
.btn-spinner { width: 16px; height: 16px; display: none; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: girar .7s linear infinite; }
.btn-entrar.carregando .btn-spinner { display: block; }
.btn-entrar.carregando .btn-seta { display: none; }
@keyframes girar { to { transform: rotate(360deg); } }

.login-card-rodape { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 30px 19px; border-top: 1px solid #dfeae7; background: rgba(238,247,244,.66); }
.status-sistema { display: flex; align-items: center; gap: 7px; justify-content: flex-start; margin: 0; padding: 0; border: 0; color: #6d837e; font: 600 8px var(--fonte); letter-spacing: .15px; }
.status-sistema i { width: 6px; height: 6px; border-radius: 50%; background: #36b682; box-shadow: 0 0 0 4px rgba(54,182,130,.09); animation: pulsoBrain 2.2s ease-out infinite; }
.login-seguranca { display: flex; align-items: center; gap: 5px; color: #7b8d89; font-size: 8px; }
.login-seguranca svg { width: 13px; height: 13px; color: #368f76; }
@keyframes pulsoBrain { 0% { box-shadow: 0 0 0 0 rgba(54,182,130,.28); } 70% { box-shadow: 0 0 0 7px rgba(54,182,130,0); } 100% { box-shadow: 0 0 0 0 rgba(54,182,130,0); } }

.login-footer { width: min(1180px,calc(100% - 56px)); min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: -62px auto 0; color: #5f7a74; font-size: 8px; letter-spacing: .2px; }

@media (max-width: 960px) {
  .login-layout { grid-template-columns: minmax(0,.8fr) minmax(380px,1fr); gap: 38px; }
  .login-apresentacao h1 { font-size: 46px; letter-spacing: -2.6px; }
  .login-conexoes { width: 360px; transform: scale(.88); transform-origin: left center; }
  .login-beneficios span:nth-child(3) { display: none; }
}

@media (max-width: 760px) {
  body::before { background-position: 42% center; }
  .login-marca { width: min(100% - 32px,500px); height: 76px; }
  .login-layout { width: min(100% - 32px,500px); min-height: calc(100vh - 122px); display: block; padding: 16px 0 78px; }
  .login-apresentacao { margin-bottom: 22px; }
  .login-eyebrow,.login-apresentacao > p,.login-conexoes,.login-beneficios { display: none; }
  .login-apresentacao h1 { margin: 0; font-size: 34px; line-height: 1.02; letter-spacing: -1.9px; }
  .login-apresentacao h1 br { display: none; }
  .login-apresentacao h1 em { margin-left: 7px; }
  .login-card { max-width: none; justify-self: auto; border-radius: 21px; }
  .login-footer { width: min(100% - 32px,500px); min-height: 52px; margin: -52px auto 0; }
  .login-footer span:first-child { display: none; }
  .login-footer span:last-child { margin-left: auto; }
}

@media (max-width: 430px) {
  .login-marca { width: calc(100% - 28px); }
  .login-marca-texto small { display: none; }
  .login-layout { width: calc(100% - 24px); padding-top: 8px; }
  .login-apresentacao { padding: 0 6px; }
  .login-apresentacao h1 { font-size: 29px; }
  .login-card-topo { padding: 21px 22px 0; }
  .login-card-cabecalho { padding: 19px 22px 0; }
  .login-card-cabecalho h2 { font-size: 27px; }
  .login-form { padding: 23px 22px 21px; }
  .login-card-rodape { padding: 15px 22px 18px; }
  .login-opcoes { align-items: flex-start; }
  .login-seguranca { display: none; }
}

@media (max-height: 720px) and (min-width: 761px) {
  .login-marca { height: 70px; }
  .login-layout { min-height: calc(100vh - 108px); padding: 12px 0 50px; }
  .login-apresentacao h1 { font-size: 48px; }
  .login-conexoes { height: 130px; margin-top: 13px; transform: scale(.82); transform-origin: left top; }
  .login-beneficios { margin-top: 0; }
  .login-card-topo { padding-top: 20px; }
  .login-card-cabecalho { padding-top: 16px; }
  .login-card-cabecalho h2 { font-size: 27px; }
  .login-form { padding-top: 19px; padding-bottom: 19px; }
  .campo { margin-bottom: 13px; }
  .login-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
