/* Tela de entrada com senha · Portal do Cliente Mandelli & Carvalho */

html.bloqueado, html.bloqueado body { overflow: hidden; }
html.bloqueado body > *:not(.login):not(script) { visibility: hidden; }

.login {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; grid-template-rows: 34vh 1fr;
  background: var(--fundo); color: var(--texto);
  transition: opacity .6s var(--ease), visibility .6s;
}
.login.saindo { opacity: 0; visibility: hidden; }


/* lado da imagem: tratamento de cinema (vinheta e degradê escuro, sem cor por cima) */
.login-arte { position: relative; overflow: hidden; background: #0C0A09; }
.login-arte img, .login-arte video { filter: saturate(.94) contrast(1.06) brightness(.97); }
.login-arte img {
  width: 100%; height: 100%; object-fit: cover;
  animation: login-zoom 14s var(--ease) both;
}
.login-arte::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 95% at 50% 42%, rgba(8, 6, 5, 0) 52%, rgba(8, 6, 5, .55) 100%),
    linear-gradient(180deg, rgba(8, 6, 5, .38) 0%, rgba(8, 6, 5, 0) 20%, rgba(8, 6, 5, 0) 52%, rgba(8, 6, 5, .82) 100%);
}
.login-arte-marca {
  position: absolute; left: var(--gutter); bottom: 22px; z-index: 2;
  display: flex; align-items: center; gap: 14px; color: #F3ECE4;
}
.login-arte-logo { height: 38px; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .35)); }
@media (max-width: 899px) {
  .login-arte-marca { gap: 12px; }
  .login-arte-nome { font-size: 16px; }
  .login-arte-sub { font-size: 9.5px; letter-spacing: .14em; }
}
.login-arte-txt { display: flex; flex-direction: column; gap: 5px; }
.login-arte-nome { font: 500 18px/1.1 var(--sans); letter-spacing: .02em; }
.login-arte-sub { font: 400 10.5px/1.2 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: rgba(243, 236, 228, .72); }

/* lado do formulário */
.login-lado {
  display: flex; align-items: center; justify-content: center;
  padding: 32px var(--gutter) 40px; overflow-y: auto;
}
.login-form {
  width: 100%; max-width: 380px;
  animation: login-sobe .9s var(--ease) .1s both;
}
/* cabeçalho do formulário: logo grande, tudo centralizado */
.login-logo { height: 76px; margin: 0 auto 26px; }
.login-form .eyebrow { justify-content: center; }
.login-form .eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; flex: none; }
.login-titulo {
  margin: 0 0 12px; text-align: center;
  font: 400 clamp(28px, 7.4vw, 40px)/1.1 var(--sans);
  letter-spacing: -.015em; color: var(--destaque); text-wrap: balance;
}
.login-cliente {
  margin: 0 auto 36px; max-width: 40ch; text-align: center; text-wrap: balance; white-space: pre-line;
  font: 400 14px/1.55 var(--sans); letter-spacing: .02em; color: var(--texto-2);
}

.login-rotulo {
  display: block; margin-bottom: 10px;
  font: 600 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--texto-3);
}
.login-campo { position: relative; }
.login-campo input {
  width: 100%; height: 54px; padding: 0 52px 0 18px;
  border: 1px solid var(--linha); border-radius: 14px;
  background: var(--fundo-2); color: var(--texto);
  font: 400 16px/1 var(--sans); letter-spacing: .04em;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.login-campo input::placeholder { color: var(--texto-3); letter-spacing: 0; }
.login-campo input:focus {
  outline: none; border-color: var(--destaque); background: var(--fundo);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--destaque) 14%, transparent);
}
.login-olho {
  position: absolute; right: 6px; top: 6px; width: 42px; height: 42px;
  display: grid; place-items: center; border: 0; border-radius: 10px;
  background: none; color: var(--texto-3); cursor: pointer;
}
.login-olho:hover, .login-olho.ativo { color: var(--destaque); }
.login-olho svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.login-erro { margin: 10px 0 0; font: 500 13px/1.3 var(--sans); color: #B3261E; }
:root[data-tema="escuro"] .login-erro { color: #F2B8B5; }
.login-form.errou .login-campo { animation: login-treme .42s; }
.login-form.errou input { border-color: #B3261E; }

.login-lembrar {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 26px;
  font: 400 14px/1.3 var(--sans); color: var(--texto-2); cursor: pointer;
}
.login-lembrar input { width: 18px; height: 18px; margin: 0; accent-color: var(--vinho); }
:root[data-tema="escuro"] .login-lembrar input { accent-color: var(--destaque); }

.login-entrar {
  width: 100%; height: 54px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 14px; cursor: pointer;
  background: var(--vinho); color: #F3ECE4;
  font: 600 12.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  box-shadow: 0 10px 24px -12px rgba(139, 32, 32, .7);
  transition: background-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.login-entrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .25s var(--ease); }
.login-entrar:hover { background: var(--vinho-2); transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(139, 32, 32, .8); }
.login-entrar:hover svg { transform: translateX(4px); }
:root[data-tema="escuro"] .login-entrar { background: #F3ECE4; color: #8B2020; box-shadow: none; }
:root[data-tema="escuro"] .login-entrar:hover { background: #FFFFFF; }

.login-ajuda { margin: 26px 0 0; text-align: center; font: 300 13.5px/1.5 var(--sans); color: var(--texto-3); }
.login-ajuda span { font-weight: 500; color: var(--texto-2); white-space: nowrap; }

@media (min-width: 900px) {
  .login { grid-template-rows: none; grid-template-columns: minmax(0, 1.15fr) minmax(440px, 1fr); }
  .login-arte-marca { bottom: 44px; left: 48px; gap: 18px; }
  .login-arte-logo { height: 60px; }
  .login-arte-nome { font-size: 24px; }
  .login-logo { height: 92px; }
  .login-lado { padding: 48px 64px; }
}

@keyframes login-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes login-sobe { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes login-treme { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@media (prefers-reduced-motion: reduce) { .login *, .login { animation: none !important; transition: none !important; } }

/* vídeo da capa na tela de entrada */
.login-arte video {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.login-arte video.rodando { opacity: 1; }
