/* Tela de login — pagina standalone, sem o shell do app.

   Estava inline no PHP (333 linhas). Fora daqui ele nao passa por
   assetVer(), entao cada deploy dependia do cache do navegador. Ver TS-111. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  background: linear-gradient(160deg, #4a4a4a 0%, #6b6b6b 40%, #555 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Container split
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.login-split {
  display: flex;
  width: 100%;
  max-width: 900px;
  min-height: 520px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: cardIn .6s cubic-bezier(.22,1,.36,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* â”€â”€ Painel esquerdo (brand) â”€â”€ */
.login-left {
  flex: 0 0 44%;
  background: linear-gradient(160deg, #5b56b8 0%, #312D77 50%, #25215C 100%);
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* Ondas decorativas SVG */
.login-left::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 120%;
  height: 120%;
  background: radial-gradient(ellipse at 80% 20%, rgba(91,86,184,.5) 0%, transparent 60%);
  pointer-events: none;
}
.login-left::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 100%;
  height: 80%;
  background: radial-gradient(ellipse at 20% 80%, rgba(37,33,92,.6) 0%, transparent 60%);
  pointer-events: none;
}

.login-left__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.login-left__logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.login-left__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.login-left__brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: .9;
}

.login-left__welcome {
  position: relative;
  z-index: 1;
  animation: welcomeSlide .7s .3s cubic-bezier(.22,1,.36,1) both;
}
@keyframes welcomeSlide {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-left__title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
}
.login-left__desc {
  font-size: 13px;
  line-height: 1.7;
  opacity: .75;
  max-width: 280px;
}

.login-left__footer {
  position: relative;
  z-index: 1;
  font-size: 11px;
  opacity: .45;
  letter-spacing: .3px;
}

/* â”€â”€ Painel direito (formulario) â”€â”€ */
.login-right {
  flex: 1;
  background: #fff;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-right__header {
  margin-bottom: 32px;
}
.login-right__title {
  font-size: 24px;
  font-weight: 700;
  color: #312D77;
  margin-bottom: 6px;
}
.login-right__sub {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

/* Campos */
.login-field {
  margin-bottom: 20px;
}
.login-field__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.login-field__wrap {
  position: relative;
}
.login-field__input {
  width: 100%;
  padding: 13px 16px;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #333;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.login-field__input::placeholder {
  color: #bbb;
}
.login-field__input:focus {
  border-color: #5b56b8;
  box-shadow: 0 0 0 3px rgba(91,86,184,.12);
}
.login-field__toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 15px;
  padding: 4px;
  transition: color .2s;
}
.login-field__toggle:hover {
  color: #666;
}

/* Options */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0 28px;
  font-size: 12px;
}
.login-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #777;
  cursor: pointer;
  font-weight: 500;
}
.login-remember input[type="checkbox"] {
  accent-color: #312D77;
  width: 15px;
  height: 15px;
}
.login-forgot {
  color: #5b56b8;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.login-forgot:hover {
  color: #312D77;
  text-decoration: underline;
}

/* Erro */
.login-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  /* ⚠️ ESCURECIDO em 31/08 (TS-224): #dc2626 dava 4,41:1 sobre este fundo. */
  color: #d52222;
  text-align: center;
  animation: shake .4s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Botao */
.login-btn {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #5b56b8 0%, #312D77 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .15s, box-shadow .25s, opacity .2s;
}
.login-btn:hover {
  box-shadow: 0 6px 24px rgba(49,45,119,.4);
  transform: translateY(-1px);
}
.login-btn:active {
  transform: scale(.98) translateY(0);
}
.login-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}
.login-btn i {
  margin-right: 6px;
  transition: transform .3s;
}
.login-btn:not(:disabled):hover i {
  transform: translateX(3px);
}

/* Loading */
.login-btn--loading { pointer-events: none; }

/* Gira SO o spinner, nao qualquer <i> do botao. A classe --loading continua
   ate o redirecionamento (o pointer-events: none dela e que barra o duplo
   envio), e no sucesso o botao troca para fa-check — com o seletor generico
   antigo, o "certo" girava junto ate a pagina sair. */
.login-btn--loading .fa-spinner {
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer do form */
.login-right__footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: #bbb;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Responsivo - tela pequena
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 700px) {
  .login-split {
    flex-direction: column;
    max-width: 420px;
    min-height: auto;
  }
  .login-left {
    flex: 0 0 auto;
    padding: 32px 28px;
  }
  .login-left__welcome { display: none; }
  .login-left__footer { display: none; }
  .login-right {
    padding: 32px 28px;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Onda SVG animada (decorativa)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.login-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  opacity: .12;
  pointer-events: none;
}
