/* Telas de acesso do RH-Saúde (login). Mesma estrutura das telas de acesso da Frota / Painel de Chamados,
   em verde-saúde, com animações discretas (desligadas para quem pede menos movimento). */
:root {
  --sd-900: #04261f;
  --sd-800: #073b31;
  --sd-700: #0b5546;
  --sd-600: #0f6e5a;
  --sd-500: #17876f;
  --sd-100: #e3f3ee;
  --menta: #7fe3c4;
  --pulso: #ff7a7a;
  --texto: #14262a;
  --suave: #5a6b6e;
  --linha: #d3e0dd;
  --fundo: #f2f6f5;
  --erro: #b42318;
  --erro-fundo: #fdecea;
  --ok-fundo: #e7f5ec;
  --raio: 10px;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--sans); color: var(--texto); background: var(--fundo); }

.acesso { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

/* ---------- Painel ---------- */
.painel {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 40px;
  padding: 48px 56px 32px;
  background: linear-gradient(150deg, var(--sd-600), var(--sd-800) 50%, var(--sd-900));
  background-size: 160% 160%;
  animation: mare 18s ease-in-out infinite alternate;
  color: #fff;
}
@keyframes mare { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

/* manchas de luz que flutuam */
.luz { position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .45; pointer-events: none; }
.luz.a { width: 420px; height: 420px; left: -120px; top: -140px; background: #1fa386; animation: flutua 16s ease-in-out infinite alternate; }
.luz.b { width: 360px; height: 360px; right: -140px; bottom: 60px; background: #0c7d8c; animation: flutua 20s ease-in-out -6s infinite alternate-reverse; }
.luz.c { width: 220px; height: 220px; left: 40%; top: 35%; background: #57d1ad; opacity: .18; animation: flutua 24s ease-in-out -3s infinite alternate; }
@keyframes flutua { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }

/* cruzinhas discretas ao fundo */
.cruzes { position: absolute; inset: 0; z-index: -1; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M25 20h6v5h5v6h-5v5h-6v-5h-5v-6h5z' fill='%23fff'/%3E%3C/svg%3E");
  animation: deriva 60s linear infinite; }
@keyframes deriva { to { background-position: 56px 112px; } }

.marca, .marca-movel { display: flex; align-items: center; gap: 16px; }
.marca img { filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.prefeitura { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.sistema { display: block; font-size: 1.7rem; font-weight: 700; line-height: 1.15; }

.chamada { margin-top: auto; max-width: 500px; }
.chamada h1 { margin: 0 0 22px; font-size: 2.15rem; font-weight: 700; line-height: 1.2; }
.chamada h1 em { font-style: normal; color: var(--menta); }
.chamada ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.chamada li { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; opacity: .94; }
.chamada li i {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 9px;
  background: rgba(255,255,255,.1); color: var(--menta); font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: transform .25s, background .25s;
}
.chamada li:hover i { transform: translateY(-2px) rotate(-6deg); background: rgba(127,227,196,.18); }

/* Monitor cardíaco */
.monitor {
  position: relative; margin-top: 30px; max-width: 460px; padding: 14px 18px 10px;
  border-radius: 14px; background: rgba(2,24,20,.38); backdrop-filter: blur(4px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 18px 36px rgba(0,0,0,.25);
}
.monitor .topo { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.monitor .bpm { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: .04em; opacity: 1; color: var(--pulso); }
.monitor .bpm i { animation: bate 1.2s ease-in-out infinite; display: inline-block; }
@keyframes bate { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 28% { transform: scale(1.1); } }
.monitor svg { display: block; width: 100%; height: 70px; margin-top: 4px; overflow: visible; }
.monitor .grade { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.monitor .ecg {
  fill: none; stroke: var(--menta); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1200; stroke-dashoffset: 1200;
  filter: drop-shadow(0 0 5px rgba(127,227,196,.8));
  animation: traca 2.4s linear infinite;
}
@keyframes traca { 0% { stroke-dashoffset: 1200; } 70% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

.rodape-painel { margin: 0; font-size: .85rem; opacity: .72; }

/* ---------- Formulário ---------- */
.formulario { position: relative; display: grid; place-items: center; padding: 40px 24px; overflow: hidden; }
.formulario::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -260px; top: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(23,135,111,.12), transparent 65%); pointer-events: none;
}
.caixa { position: relative; width: 100%; max-width: 410px; }
.marca-movel { display: none; margin-bottom: 28px; color: var(--sd-800); }
.marca-movel .sistema { font-size: 1.35rem; }

.caixa h2 { margin: 0; font-size: 2.05rem; font-weight: 700; color: var(--sd-800); }
.caixa h2 .aceno { display: inline-block; margin-left: 4px; font-size: .8em; color: var(--sd-500); animation: bate 1.6s ease-in-out 1s infinite; }
.caixa .sub { margin: 4px 0 26px; color: var(--suave); }

.campo { display: block; margin-bottom: 18px; }
.campo > span:first-child { display: block; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.entrada { position: relative; display: flex; align-items: center; }
.entrada > i { position: absolute; z-index: 2; left: 14px; color: var(--suave); font-size: 1.05rem; pointer-events: none; transition: color .2s, transform .2s; }
.entrada input {
  width: 100%; height: 52px; padding: 0 14px 0 44px;
  border: 1.5px solid var(--linha); border-radius: var(--raio); background: #fff;
  font: 400 1.07rem var(--sans); color: var(--texto); outline: 0;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.entrada input::placeholder { color: #9aa8a6; }
.entrada input:hover { border-color: #b5cbc6; }
.entrada input:focus { border-color: var(--sd-500); box-shadow: 0 0 0 4px rgba(23,135,111,.16), 0 8px 18px rgba(7,59,49,.08); transform: translateY(-1px); }
.entrada:focus-within > i { color: var(--sd-600); transform: scale(1.12); }
.entrada .confere { position: absolute; z-index: 2; left: auto; right: 14px; color: var(--sd-500); font-size: 1.15rem; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .3s cubic-bezier(.3,1.6,.5,1); pointer-events: none; }
.entrada.valido .confere { opacity: 1; transform: scale(1); }
.ver-senha {
  position: absolute; right: 6px; width: 42px; height: 42px; border: 0; border-radius: 8px;
  z-index: 2; background: transparent; color: var(--suave); font-size: 1.15rem; cursor: pointer; transition: background .15s, color .15s;
}
.ver-senha:hover, .ver-senha:focus-visible { background: var(--sd-100); color: var(--sd-700); outline: 0; }
.entrada:has(.ver-senha) input { padding-right: 52px; }
.caps[hidden] { display: none; }
.caps { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .88rem; font-weight: 600; color: #8a5a00; animation: surge .25s ease-out; }

.botao {
  position: relative; overflow: hidden;
  width: 100%; height: 54px; margin-top: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: var(--raio);
  background: linear-gradient(135deg, var(--sd-500), var(--sd-700));
  color: #fff; font: 700 1.1rem var(--sans); cursor: pointer;
  box-shadow: 0 10px 22px rgba(11,85,70,.28);
  transition: box-shadow .2s, transform .15s, filter .2s;
}
.botao::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.botao:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(11,85,70,.34); filter: brightness(1.05); }
.botao:hover::after { left: 120%; }
.botao:hover i { transform: translateX(3px); }
.botao i { transition: transform .2s; }
.botao:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(11,85,70,.3); }
.botao:focus-visible { outline: 3px solid rgba(23,135,111,.4); outline-offset: 2px; }
.botao:disabled { opacity: .8; cursor: wait; transform: none; }
.giro { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: giro .7s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

.links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.links a { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--sd-700); font-weight: 600; text-decoration: none; padding-bottom: 2px; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.links a:hover::after, .links a:focus-visible::after { transform: scaleX(1); }

.versao { margin: 34px 0 0; text-align: center; font-size: .85rem; color: var(--suave); }

.alerta { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; padding: 12px 14px; border-radius: var(--raio); font-size: .97rem; }
.alerta i { margin-top: 2px; }
.alerta.erro { background: var(--erro-fundo); color: var(--erro); border: 1px solid #f5c2bd; animation: surge .3s ease-out, treme .45s ease-in-out .3s; }
.alerta.ok { background: var(--ok-fundo); color: #11603f; border: 1px solid #bfe3cc; animation: surge .3s ease-out; }
@keyframes surge { from { opacity: 0; transform: translateY(-6px); } }
@keyframes treme { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Entrada da página (em cascata) ---------- */
.entra { opacity: 0; animation: sobe .7s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
@keyframes sobe { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.painel .entra { animation-name: sobe-esq; }
@keyframes sobe-esq { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }

/* ---------- Telas menores ---------- */
@media (max-width: 1000px) {
  .painel { padding: 40px 36px 28px; }
  .chamada h1 { font-size: 1.75rem; }
  .chamada ul { grid-template-columns: 1fr; }
}
.faixa-movel { display: none; height: 46px; margin: 0 -16px 26px; background: linear-gradient(135deg, var(--sd-600), var(--sd-900)); overflow: hidden; }
.faixa-movel svg { display: block; width: 100%; height: 100%; }
.faixa-movel .ecg { fill: none; stroke: var(--menta); stroke-width: 2; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: traca 2.4s linear infinite; }

@media (max-width: 760px) {
  .acesso { grid-template-columns: minmax(0, 1fr); }
  .painel { display: none; }
  .marca-movel { display: flex; }
  .formulario { place-items: start center; padding: 0 16px 32px; }
  .faixa-movel { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .entra { opacity: 1; }
  .monitor .ecg, .faixa-movel .ecg { stroke-dashoffset: 0; }
}

/* ======================================================================
   Telas auxiliares (recuperar senha, nova senha): body.tela-aux
   Mesma estrutura, mas painel e botão em azul-noite, selo âmbar e etapas,
   para ninguém confundir com o login (verde).
   ====================================================================== */
.tela-aux {
  --ax-900: #10183a;
  --ax-800: #1b2758;
  --ax-700: #263777;
  --ax-600: #34499a;
  --ax-100: #e7ebf8;
  --ambar: #f5c84c;
}
.tela-aux .painel { background: linear-gradient(150deg, var(--ax-600), var(--ax-800) 50%, var(--ax-900)); background-size: 160% 160%; }
.tela-aux .luz.a { background: #4a63c4; }
.tela-aux .luz.b { background: #3d2f8f; }
.tela-aux .luz.c { background: #f5c84c; opacity: .08; }
.tela-aux .marca-movel { color: var(--ax-800); }
.tela-aux .cruzes { opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M22 24h20v14H22z M22 24l10 8 10-8' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E"); }
.tela-aux .chamada { margin-top: 56px; }
.tela-aux .chamada h1 em { color: var(--ambar); }

.selo-tela {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 6px 14px;
  border: 1px solid rgba(245,200,76,.55); border-radius: 999px; background: rgba(245,200,76,.08);
  color: var(--ambar); font-weight: 700; font-size: .88rem; letter-spacing: .06em; text-transform: uppercase;
}
.selo-tela i { animation: balanca 3s ease-in-out 1s infinite; display: inline-block; }
@keyframes balanca { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-16deg); } 88% { transform: rotate(10deg); } }

.etapas { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.etapas::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: rgba(255,255,255,.18); }
.etapas li { position: relative; display: flex; gap: 16px; align-items: flex-start; opacity: .6; }
.etapas li span {
  position: relative; flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.55); background: var(--ax-800); font-weight: 700; font-size: 1.1rem;
}
.etapas li strong { display: block; font-size: 1.08rem; }
.etapas li div { font-size: .98rem; line-height: 1.4; }
.etapas li.atual { opacity: 1; }
.etapas li.atual span { background: var(--ambar); border-color: var(--ambar); color: var(--ax-900); }
.etapas li.atual span::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--ambar);
  animation: onda 1.8s ease-out infinite;
}
@keyframes onda { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.etapas li.feita { opacity: .92; }
.etapas li.feita span { background: #2f8f6f; border-color: #2f8f6f; }
.tela-aux .rodape-painel { margin-top: auto; }

.titulo-aux { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--ax-100); }
.titulo-aux .ico {
  flex: none; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 16px;
  background: linear-gradient(145deg, var(--ax-600), var(--ax-900)); color: var(--ambar); font-size: 1.75rem;
  box-shadow: 0 10px 22px rgba(27,39,88,.28);
  animation: pousa .8s cubic-bezier(.3,1.5,.5,1) .2s both;
}
@keyframes pousa { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.titulo-aux h2 { margin: 0; font-size: 1.9rem; line-height: 1.15; color: var(--ax-800); }
.titulo-aux .sub { margin: 4px 0 0; }
.tela-aux .caixa .sub strong { color: #b42318; }

.tela-aux .entrada input:focus { border-color: var(--ax-600); box-shadow: 0 0 0 4px rgba(52,73,154,.16), 0 8px 18px rgba(27,39,88,.08); }
.tela-aux .entrada:focus-within > i { color: var(--ax-600); }
.tela-aux .entrada .confere { color: var(--ax-600); }
.tela-aux .botao { background: linear-gradient(135deg, var(--ax-600), var(--ax-800)); box-shadow: 0 10px 22px rgba(27,39,88,.28); margin-top: 10px; }
.tela-aux .botao:hover { box-shadow: 0 14px 28px rgba(27,39,88,.34); }
.tela-aux .botao:focus-visible { outline-color: rgba(52,73,154,.4); }
.tela-aux .ver-senha:hover, .tela-aux .ver-senha:focus-visible { background: var(--ax-100); color: var(--ax-700); }
.tela-aux .links a { color: var(--ax-700); }
.tela-aux .formulario::before { background: radial-gradient(circle, rgba(52,73,154,.12), transparent 65%); }
.tela-aux .faixa-movel { background: linear-gradient(135deg, var(--ax-600), var(--ax-900)); }
.tela-aux .faixa-movel span { display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%; color: var(--ambar); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.links.centro { justify-content: center; }
a.botao { text-decoration: none; }

.dica { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .88rem; color: var(--suave); }
.dica.boa { color: #11603f; font-weight: 600; }
.dica.ruim { color: var(--erro); font-weight: 600; }
.dica[hidden] { display: none; }

/* Estado "Verifique o e-mail" / "Link expirado" */
.estado { text-align: center; }
.ico-grande {
  position: relative; width: 96px; height: 96px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%;
  background: var(--ax-100); color: var(--ax-700); font-size: 2.7rem;
  animation: pousa .8s cubic-bezier(.3,1.5,.5,1) .15s both;
}
.ico-grande::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ax-600); animation: onda 2.2s ease-out 1s infinite; }
.estado.erro .ico-grande { background: var(--erro-fundo); color: var(--erro); }
.estado.erro .ico-grande::after { border-color: var(--erro); }
.estado h2 { margin: 0 0 8px; font-size: 1.9rem; color: var(--ax-800); }
.estado > p { margin: 0 0 20px; color: var(--suave); font-size: 1.05rem; }
.lembretes { list-style: none; margin: 0 0 24px; padding: 16px 18px; display: grid; gap: 10px; text-align: left; background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); }
.lembretes li { display: flex; gap: 10px; align-items: flex-start; }
.lembretes i { color: var(--ax-600); margin-top: 2px; }

/* Requisitos da senha (senha_forte.js) */
.requisitos { margin: 4px 0 6px; padding: 12px 14px; border: 1px solid var(--linha); border-radius: var(--raio); background: #fff; }
.requisitos small { display: block; margin-bottom: 6px; font-weight: 700; font-size: .88rem; color: var(--texto); }
.requisitos ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.requisitos li { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--suave); transition: color .2s; }
.requisitos li.ok { color: #11603f; font-weight: 600; }
.requisitos li.ok i { color: #17876f; animation: pousa .4s cubic-bezier(.3,1.5,.5,1); }
.tela-aux .botao:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.3); }

@media (max-width: 760px) {
  .titulo-aux h2 { font-size: 1.6rem; }
  .titulo-aux .ico { width: 52px; height: 52px; font-size: 1.45rem; }
  .requisitos ul { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tela-aux *, .tela-aux *::before, .tela-aux *::after { animation: none !important; }
}

/* Cadastro (registro.php): caixa larga, campos em duas colunas e lista de setor */
.caixa.larga { max-width: 580px; }
.duas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.entrada select {
  width: 100%; height: 52px; padding: 0 40px 0 44px; appearance: none; -webkit-appearance: none;
  border: 1.5px solid var(--linha); border-radius: var(--raio); outline: 0; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235a6b6e' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  font: 400 1.05rem var(--sans); color: var(--texto); text-overflow: ellipsis;
  transition: border-color .2s, box-shadow .2s;
}
.entrada select:invalid { color: #9aa8a6; }
.entrada select:hover { border-color: #b5cbc6; }
.tela-aux .entrada select:focus { border-color: var(--ax-600); box-shadow: 0 0 0 4px rgba(52,73,154,.16); }
.tela-cadastro .formulario { padding-top: 32px; padding-bottom: 32px; }
@media (max-width: 760px) {
  .duas { grid-template-columns: minmax(0, 1fr); }
  .tela-cadastro .formulario { padding-top: 0; }
}
