﻿@import url('admin.css');

:root {
  --primary: #4B6700; /* Deep Green */
  --primary-lime: #BFFF00; /* Vibrant Lime */
  --bg-light: #F8FCE5;
  --text-dark: #191D10;
  --text-muted: #434933;
  --white: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: inherit;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* Impede zoom e rolagem lateral */
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f8fce5 0%, #eef3d5 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Feedback global de carregamento/processamento */
.global-page-loader {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 31, 65, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.global-page-loader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.global-page-loader__card {
  width: min(92vw, 360px);
  border-radius: 28px;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 70px rgba(3, 31, 65, 0.24);
  text-align: center;
  color: #031f41;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.18s ease;
}

.global-page-loader.is-visible .global-page-loader__card {
  transform: translateY(0) scale(1);
}

.global-page-loader__spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid rgba(3, 31, 65, 0.12);
  border-top-color: #031f41;
  border-right-color: #FFE241;
  animation: globalLoaderSpin 0.85s linear infinite;
}

.global-page-loader__title {
  font-family: 'Outfit', 'Poppins', sans-serif;
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.global-page-loader__text {
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  margin: 0;
}

body.is-processing,
body.is-processing * {
  cursor: progress !important;
}

@keyframes globalLoaderSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-page-loader,
  .global-page-loader__card {
    transition: none;
  }

  .global-page-loader__spinner {
    animation-duration: 1.8s;
  }
}

img {
  max-width: 100%;
  height: auto;
}

.login-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100vh;
}

/* --- Lado Esquerdo (Branding Desktop) --- */
.branding-side {
  padding: 40px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 10;
}

.brand-identity {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-logo { width: 120px; }
.main-slogan { width: 180px; }

.hero-message h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary);
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.hero-message p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 400px;
}

/* Classes de Controle */
.mobile-only { display: none !important; }
.student-mobile-box { display: none; }
.mobile-only-header { display: none; }

/* --- Lado Direito (Login Side Desktop) --- */
.login-side {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lime-shape {
  position: absolute;
  top: 0;
  right: -5%;
  width: 110%;
  height: 100%;
  background: var(--primary-lime);
  border-radius: 200px 0 0 200px;
  transform: rotate(-3deg) translateY(5%);
  z-index: 1;
}

.auth-card {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  border-radius: 40px;
  box-shadow: 0 40px 100px rgba(75, 103, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.auth-card header { margin-bottom: 24px; }
.auth-card header h2 {
  font-size: 28px;
  font-weight: 800;
  color: #000;
  margin-bottom: 4px;
  letter-spacing: -1px;
}
.auth-card header p { color: var(--text-muted); font-size: 14px; }

/* Estrutura de Campo Unificada */
.input-group { margin-bottom: 20px; }
.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #434933; /* Cor mais equilibrada */
  margin-bottom: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.field-wrapper { 
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  padding: 0 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.field-wrapper:focus-within {
  border-color: var(--primary-lime);
  box-shadow: 0 0 0 4px rgba(191, 255, 0, 0.15);
  background: #fff;
}

.field-wrapper i {
  color: #94a3b8;
  width: 20px;
  height: 20px;
  margin-right: 28px;
  flex-shrink: 0;
  transition: color 0.3s;
}

.field-wrapper:focus-within i {
  color: var(--primary);
}

.field-wrapper input {
  width: 100%;
  padding: 14px 10px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  outline: none;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 0 4px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #000;
  font-weight: 600;
  cursor: pointer;
}

.forgot-pw {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.btn-submit {
  width: 100%;
  background: var(--primary-lime);
  color: var(--primary);
  border: none;
  padding: 16px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(191, 255, 0, 0.3);
}

.card-footer {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(0,0,0,0.06);
  text-align: center;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
}

/* AnimaÃ§Ã£o */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-entrance { animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* =========================================
   MOBILE DESIGN (Encaixe Perfeito)
   ========================================= */
@media (max-width: 1024px) {
  body {
    background: linear-gradient(180deg, var(--primary-lime) 0%, var(--bg-light) 40%);
    overflow-y: auto;
    display: block;
    height: auto;
    width: 100%;
  }

  .login-page {
    grid-template-columns: 1fr;
    height: auto;
    width: 100%;
    padding-bottom: 60px;
  }

  .desktop-only { display: none !important; }
  .desktop-only-h1 { display: none !important; }
  .desktop-only-p { display: none !important; }
  .mobile-only { display: block !important; }
  .mobile-only-header { display: block !important; }

  .branding-side {
    padding: 60px 24px 20px 24px;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .brand-identity {
    margin-bottom: 24px;
    align-items: center;
    width: 100%;
  }

  .main-logo { width: 130px; max-width: 80%; }

  .student-mobile-box {
    display: flex !important;
    justify-content: center;
    margin-bottom: 32px;
    width: 100%;
  }

  .student-img {
    width: 280px;
    max-width: 90%;
    filter: drop-shadow(0 20px 40px rgba(75, 103, 0, 0.1));
    /* Suaviza o corte da imagem na base */
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  }

  .hero-message {
    margin-bottom: 0; /* Totalmente encostado no card */
  }

  .mobile-only-header h1 {
    font-size: clamp(28px, 8vw, 42px); /* Ligeiramente menor para caber em uma linha */
    font-weight: 800;
    color: #191d10;
    margin-bottom: 12px;
    letter-spacing: -1px;
    white-space: nowrap; /* Impede a quebra de linha */
  }

  .system-badge {
    display: inline-block;
    background: rgba(75, 103, 0, 0.05);
    color: var(--primary);
    padding: 8px 24px;
    border-radius: 100px;
    font-size: 10px; /* Reduzi um pouco para garantir linha Ãºnica */
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap; /* Impede a quebra de linha */
  }

  .login-side {
    padding: 0 20px;
    width: 100%;
  }

  .lime-shape { display: none; }

  .auth-card {
    position: relative;
    overflow: hidden; /* Para conter a decoraÃ§Ã£o */
    background: #ffffff;
    border-radius: 60px;
    width: 100%;
    max-width: 100%;
    padding: 64px 24px 32px 24px;
    box-shadow: 0 20px 60px rgba(75, 103, 0, 0.08);
  }

  .auth-card .card-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 140px; /* Aumentado para 140px como solicitado */
    height: 140px;
    background: #f1fcc9;
    border-radius: 0 0 0 100%;
    z-index: 1;
    pointer-events: none;
  }

  .auth-card > * { position: relative; z-index: 10; } /* Garante que conteÃºdo fique acima da decoraÃ§Ã£o */

  .auth-card header { display: none; }

  .field-wrapper {
    padding: 0 16px;
    border-radius: 14px;
  }

  .field-wrapper i {
    margin-right: 28px; /* Mesma distÃ¢ncia do desktop */
  }

  .field-wrapper input {
    padding: 16px 10px; /* Mesmo respiro do desktop */
    font-size: 15px;
  }

  .btn-submit {
    padding: 22px;
    font-size: 24px;
    letter-spacing: 4px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .remember-me {
    color: #191d10;
    font-weight: 700;
  }

  .forgot-pw {
    color: #4b6700;
    font-weight: 700;
  }

  .help-pill {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    background: rgba(75, 103, 0, 0.05);
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin: 32px auto;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 32px;
    width: 100%;
  }

  .mobile-slogan img {
    width: 240px;
    max-width: 80%;
    opacity: 0.8;
  }
}

/* =========================================
   Portal Canaa login visual standard
   ========================================= */
body.auth-login-body {
  --canaa-navy: #002855;
  --canaa-navy-soft: #003d82;
  --canaa-ink: #101418;
  --canaa-muted: #4b5563;
  --canaa-surface: #f8f9fa;
  --canaa-line: rgba(0, 40, 85, 0.10);
  --canaa-yellow: #FDB913;
  display: block;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 249, 250, 0.98) 54%, rgba(237, 242, 247, 0.86) 100%);
  color: var(--canaa-ink);
  font-family: 'Poppins', Arial, sans-serif;
  overflow-x: hidden;
}

body.auth-login-body .portal-login {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.86fr);
  width: 100%;
  min-height: 100vh;
  height: auto;
  overflow: hidden;
}

body.auth-login-body .portal-login::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(3, 31, 65, 0.024) 1px, transparent 1px),
    linear-gradient(0deg, rgba(3, 31, 65, 0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.42;
}

body.auth-login-body .branding-side {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 34px 46px 46px 5.5vw;
}

body.auth-login-body .content-wrapper {
  width: 100%;
  max-width: 560px;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.auth-login-body .brand-identity {
  align-items: flex-start;
  gap: 0;
  margin: 0 0 30px 0;
}

body.auth-login-body .main-logo {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(3, 31, 65, 0.10));
}

body.auth-login-body .main-slogan,
body.auth-login-body .student-mobile-box {
  display: none !important;
}

body.auth-login-body .hero-message {
  margin: 0 0 24px;
}

body.auth-login-body .hero-message h1 {
  color: var(--canaa-navy);
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 3.45rem;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0;
  margin: 0 0 28px;
  text-wrap: balance;
}

body.auth-login-body .hero-message h1 span {
  color: var(--canaa-ink);
}

body.auth-login-body .hero-message p {
  color: #374151;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.65;
  max-width: 470px;
}

body.auth-login-body .mobile-only-header,
body.auth-login-body .mobile-only {
  display: none !important;
}

body.auth-login-body .login-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 34px 4.5vw 34px 0;
}

body.auth-login-body .navy-shape {
  position: absolute;
  inset: -7% -18% -8% 4%;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 34%),
    linear-gradient(145deg, var(--canaa-navy) 0%, var(--canaa-navy-soft) 100%);
  border-radius: 78px 0 0 78px;
  transform: skewX(-8deg);
  box-shadow: -34px 0 90px rgba(3, 31, 65, 0.12);
}

body.auth-login-body .auth-card {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  max-width: 420px;
  padding: 38px 40px 34px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 34px 90px rgba(3, 31, 65, 0.22);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
}

body.auth-login-body .auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.64), rgba(248, 249, 250, 0.24));
  pointer-events: none;
}

body.auth-login-body .auth-card header {
  margin-bottom: 30px;
}

body.auth-login-body .auth-card header h2 {
  color: var(--canaa-ink);
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  margin: 0 0 10px;
}

body.auth-login-body .auth-card header p {
  color: #343a40;
  font-size: 0.9rem;
  font-weight: 500;
}

body.auth-login-body .login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin: -12px 0 22px;
  border-radius: 16px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: rgba(254, 242, 242, 0.88);
  color: #991b1b;
  font-size: 0.88rem;
  font-weight: 700;
}

body.auth-login-body .login-alert i {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

body.auth-login-body .input-group {
  margin-bottom: 20px;
}

body.auth-login-body .input-group label {
  color: #232833;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px 22px;
}

body.auth-login-body .field-wrapper {
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid rgba(3, 31, 65, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  gap: 16px; /* Added gap between icon and input */
}

body.auth-login-body .field-wrapper:focus-within {
  border-color: rgba(3, 31, 65, 0.32);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(3, 31, 65, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.auth-login-body .field-wrapper i {
  width: 22px;
  height: 22px;
  color: #9aa3ad;
  flex: 0 0 22px;
}

body.auth-login-body .field-wrapper:focus-within i {
  color: var(--canaa-navy);
}

body.auth-login-body .field-wrapper input {
  color: #172033;
  padding: 14px 0;
  font-size: 0.92rem;
  font-weight: 600;
  width: 100%;
}

body.auth-login-body .field-wrapper input::placeholder {
  color: #697386;
  opacity: 1;
}

body.auth-login-body .form-options {
  margin: 0 0 22px;
  padding: 0 18px;
  gap: 14px;
}

body.auth-login-body .remember-me {
  color: #222833;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 8px;
}

body.auth-login-body .remember-me input {
  width: 18px;
  height: 18px;
  accent-color: var(--canaa-navy);
}

body.auth-login-body .forgot-pw {
  color: var(--canaa-navy);
  font-size: 0.78rem;
  font-weight: 800;
}

body.auth-login-body .btn-submit {
  min-height: 58px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--canaa-navy) 0%, var(--canaa-navy-soft) 100%);
  color: #ffffff;
  border: 1px solid rgba(3, 31, 65, 0.45);
  box-shadow: 0 18px 34px rgba(3, 31, 65, 0.24);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.auth-login-body .btn-submit i {
  width: 24px;
  height: 24px;
}

body.auth-login-body .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(3, 31, 65, 0.28);
}

body.auth-login-body .btn-submit:focus-visible,
body.auth-login-body .forgot-pw:focus-visible,
body.auth-login-body .support-link:focus-visible,
body.auth-login-body .footer-bottom a:focus-visible {
  outline: 3px solid rgba(255, 226, 65, 0.95);
  outline-offset: 4px;
}

body.auth-login-body .card-footer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--canaa-line);
}

body.auth-login-body .support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #303846;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0 auto 22px;
}

body.auth-login-body .support-link i {
  width: 19px;
  height: 19px;
}

body.auth-login-body .footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 22px;
  align-items: center;
  justify-content: initial;
  color: #8b8f97;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: left;
}

body.auth-login-body .footer-bottom a {
  color: #8b8f97;
  text-decoration: none;
}

@media (max-width: 1180px) {
  body.auth-login-body .portal-login {
    grid-template-columns: minmax(0, 0.95fr) minmax(410px, 1.05fr);
  }

  body.auth-login-body .branding-side {
    padding-left: 40px;
  }

  body.auth-login-body .hero-message h1 {
    font-size: 3rem;
  }

  body.auth-login-body .auth-card {
    padding: 34px 34px 32px;
  }
}

@media (max-width: 1024px) {
  body.auth-login-body {
    background: var(--canaa-surface);
    overflow-y: auto;
  }

  body.auth-login-body .portal-login {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    padding: 18px 16px 28px;
    background:
      linear-gradient(180deg, rgba(3, 31, 65, 0.98) 0, rgba(29, 53, 87, 0.98) 290px, rgba(248, 249, 250, 1) 290px);
  }

  body.auth-login-body .portal-login::before {
    display: none;
  }

  body.auth-login-body .branding-side {
    display: block;
    padding: 0;
    text-align: center;
  }

  body.auth-login-body .content-wrapper {
    min-height: 0;
    max-width: none;
    align-items: center;
    justify-content: flex-start;
  }

  body.auth-login-body .brand-identity {
    align-items: center;
    margin: 6px 0 14px;
  }

  body.auth-login-body .main-logo {
    width: 110px;
    filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.18));
  }

  body.auth-login-body .desktop-only-h1,
  body.auth-login-body .desktop-only-p,
  body.auth-login-body .navy-shape {
    display: none !important;
  }

  body.auth-login-body .mobile-only-header {
    display: block !important;
  }

  body.auth-login-body .hero-message {
    margin: 0;
  }

  body.auth-login-body .mobile-only-header h1 {
    color: #ffffff;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
    margin: 0 0 12px;
  }

  body.auth-login-body .system-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 34px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    white-space: normal;
  }

  body.auth-login-body .login-side {
    min-height: 0;
    padding: 20px 0 0;
  }

  body.auth-login-body .auth-card {
    width: 100%;
    max-width: 560px;
    padding: 28px 20px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(3, 31, 65, 0.18);
  }

  body.auth-login-body .auth-card header {
    display: block;
    margin-bottom: 22px;
    text-align: left;
  }

  body.auth-login-body .auth-card header h2 {
    font-size: 1.55rem;
  }

  body.auth-login-body .auth-card header p {
    font-size: 0.86rem;
  }

  body.auth-login-body .login-alert {
    margin: -8px 0 24px;
  }

  body.auth-login-body .input-group {
    margin-bottom: 18px;
  }

  body.auth-login-body .input-group label {
    margin-left: 18px;
    font-size: 0.72rem;
  }

  body.auth-login-body .field-wrapper {
    min-height: 52px;
    padding: 0 20px;
  }

  body.auth-login-body .field-wrapper i {
    margin-right: 18px;
  }

  body.auth-login-body .field-wrapper input {
    min-width: 0;
    font-size: 0.95rem;
  }

  body.auth-login-body .form-options {
    align-items: flex-start;
    padding: 0 2px;
    gap: 12px;
  }

  body.auth-login-body .remember-me,
  body.auth-login-body .forgot-pw {
    font-size: 0.82rem;
  }

  body.auth-login-body .btn-submit {
    min-height: 56px;
    padding: 0 24px;
    font-size: 0.92rem;
  }

  body.auth-login-body .card-footer {
    margin-top: 32px;
    padding-top: 28px;
  }

  body.auth-login-body .support-link {
    margin-bottom: 24px;
  }

  body.auth-login-body .footer-bottom {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  body.auth-login-body .portal-login {
    padding: 18px 14px 28px;
  }

  body.auth-login-body .form-options {
    flex-direction: column;
  }

  body.auth-login-body .auth-card {
    border-radius: 24px;
  }
}

/* Mobile native-app polish for the login screen only */
@media (max-width: 1024px) {
  body.auth-login-body {
    min-height: 100svh;
    background: #eef4f9;
  }

  body.auth-login-body .portal-login {
    min-height: 100svh;
    padding: 0;
    display: flex;
    flex-direction: column;
    background:
      radial-gradient(circle at 82% 8%, rgba(253, 185, 19, 0.16), transparent 26%),
      linear-gradient(180deg, #031f41 0%, #07305c 43%, #eef4f9 43%, #eef4f9 100%);
    overflow: visible;
  }

  body.auth-login-body .branding-side {
    min-height: 292px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(24px, env(safe-area-inset-top)) 22px 28px;
  }

  body.auth-login-body .content-wrapper {
    width: 100%;
    max-width: 430px;
    align-items: center;
  }

  body.auth-login-body .brand-identity {
    margin: 0 0 16px;
  }

  body.auth-login-body .main-logo {
    width: 96px;
    padding: 8px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  }

  body.auth-login-body .hero-message {
    width: 100%;
    text-align: center;
  }

  body.auth-login-body .mobile-only-header h1 {
    font-size: clamp(2rem, 8vw, 2.7rem);
    line-height: 1.02;
    letter-spacing: -1.1px;
    margin-bottom: 12px;
  }

  body.auth-login-body .system-badge {
    min-height: 38px;
    padding: 9px 17px;
    border: 1px solid rgba(255, 226, 65, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
    font-size: 0.67rem;
    letter-spacing: 0.03em;
  }

  body.auth-login-body .login-side {
    width: 100%;
    flex: 1;
    align-items: stretch;
    padding: 0;
    margin-top: -28px;
  }

  body.auth-login-body .auth-card {
    width: 100%;
    max-width: none;
    min-height: calc(100svh - 250px);
    padding: 32px 24px calc(26px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 34px 34px 0 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -18px 48px rgba(3, 31, 65, 0.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  body.auth-login-body .auth-card::before {
    background: transparent;
  }

  body.auth-login-body .auth-card header {
    margin-bottom: 24px;
  }

  body.auth-login-body .auth-card header h2 {
    color: #101418;
    font-size: clamp(1.85rem, 7vw, 2.2rem);
    line-height: 1.02;
    letter-spacing: -0.9px;
    margin-bottom: 8px;
  }

  body.auth-login-body .auth-card header p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 600;
  }

  body.auth-login-body .login-alert {
    margin: -6px 0 22px;
    padding: 13px 14px;
    border-radius: 18px;
    font-size: 0.86rem;
  }

  body.auth-login-body .input-group {
    margin-bottom: 17px;
  }

  body.auth-login-body .input-group label {
    margin: 0 0 9px 4px;
    color: #334155;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  body.auth-login-body .field-wrapper {
    min-height: 60px;
    padding: 0 18px;
    border-radius: 20px;
    border: 1px solid rgba(0, 40, 85, 0.10);
    background: #f8fbff;
    box-shadow: none;
    gap: 13px;
  }

  body.auth-login-body .field-wrapper:focus-within {
    border-color: rgba(0, 40, 85, 0.32);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 40, 85, 0.08);
  }

  body.auth-login-body .field-wrapper i {
    margin-right: 0;
    color: #031f41;
    opacity: 0.68;
  }

  body.auth-login-body .field-wrapper input {
    padding: 15px 0;
    font-size: 0.96rem;
  }

  body.auth-login-body .field-wrapper input::placeholder {
    color: #8a94a6;
  }

  body.auth-login-body .form-options {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
    margin: 2px 0 22px;
    gap: 12px;
  }

  body.auth-login-body .remember-me {
    color: #334155;
    font-size: 0.82rem;
  }

  body.auth-login-body .remember-me input {
    width: 18px;
    height: 18px;
    border-radius: 6px;
  }

  body.auth-login-body .forgot-pw {
    color: #031f41;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  body.auth-login-body .btn-submit {
    min-height: 60px;
    border-radius: 20px;
    background: linear-gradient(135deg, #031f41 0%, #053d78 100%);
    box-shadow: 0 18px 34px rgba(3, 31, 65, 0.24);
    font-size: 0.95rem;
  }

  body.auth-login-body .login-form > div[style*="text-align: center"] {
    margin-top: 24px !important;
    padding-top: 22px !important;
    border-top-color: rgba(0, 40, 85, 0.08) !important;
  }

  body.auth-login-body .login-form > div[style*="text-align: center"] p {
    color: #64748b !important;
    font-size: 0.72rem !important;
  }

  body.auth-login-body .login-form > div[style*="text-align: center"] a {
    min-height: 46px;
    padding: 0 22px !important;
    border-radius: 999px !important;
    background: #fff8d7 !important;
    border-color: rgba(253, 185, 19, 0.35) !important;
    color: #031f41 !important;
    box-shadow: 0 12px 22px rgba(253, 185, 19, 0.12) !important;
  }
}

@media (max-width: 520px) {
  body.auth-login-body .branding-side {
    min-height: 292px;
    padding-left: 18px;
    padding-right: 18px;
  }

  body.auth-login-body .login-side {
    margin-top: -28px;
  }

  body.auth-login-body .auth-card {
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 30px 30px 0 0;
  }

  body.auth-login-body .form-options {
    gap: 10px;
  }

  body.auth-login-body .remember-me,
  body.auth-login-body .forgot-pw {
    font-size: 0.78rem;
  }
}

@media (max-width: 370px) {
  body.auth-login-body .form-options {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Mobile login â€” native app inspired layout */
@media (max-width: 1024px) {
  body.auth-login-body {
    min-height: 100svh;
    background: #f8fbff;
  }

  body.auth-login-body .portal-login {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: 0 22px;
    overflow: hidden;
    background:
      radial-gradient(circle at 50% 23%, rgba(3, 31, 65, 0.08), transparent 28%),
      radial-gradient(circle at 20% 10%, rgba(253, 185, 19, 0.07), transparent 22%),
      linear-gradient(180deg, #ffffff 0%, #f8fbff 52%, #ffffff 100%);
  }

  body.auth-login-body .portal-login::before {
    content: "";
    position: absolute;
    inset: 22px 18px auto;
    height: 310px;
    z-index: 0;
    opacity: 0.42;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='430' height='310' viewBox='0 0 430 310' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='%23DCE6F2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M42 92c28-13 47-12 72 4V52c-23-14-45-14-72-1v41Z'/%3E%3Cpath d='M114 96c25-16 48-18 72-5V49c-23-12-46-11-72 3v44Z'/%3E%3Cpath d='M310 67l48 19-11 29-48-20 11-28Z'/%3E%3Cpath d='M358 86l20 8-11 29-20-8'/%3E%3Cpath d='M305 206l70-37 69 37-69 36-70-36Z'/%3E%3Cpath d='M158 42l19-39 18 39 43 6-31 30 7 42-37-20-38 20 8-42-32-30 43-6Z'/%3E%3Cpath d='M46 237c22 3 37 18 39 42 2-24 17-39 39-42-22-4-37-19-39-43-2 24-17 39-39 43Z'/%3E%3Cpath d='M232 51c18 4 26 13 28 29' stroke-dasharray='8 10'/%3E%3Cpath d='M281 37c24-4 43 5 55 26' stroke-dasharray='8 10'/%3E%3Cpath d='M64 174c-28 26-34 55-17 88' stroke-dasharray='8 10'/%3E%3Cpath d='M355 138c30 18 41 45 31 78' stroke-dasharray='8 10'/%3E%3C/g%3E%3C/svg%3E");
  }

  body.auth-login-body .portal-login::after {
    content: "";
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: -1px;
    height: 154px;
    z-index: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center bottom;
    background-image: url("data:image/svg+xml,%3Csvg width='430' height='154' viewBox='0 0 430 154' preserveAspectRatio='none' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23FDB913' d='M148 96C215 50 285 31 356 47C389 54 414 67 430 79V154H0V136C52 122 99 128 148 96Z'/%3E%3Cpath fill='%23002855' d='M0 52C73 73 127 105 195 97C261 89 310 61 372 79C394 85 413 96 430 110V154H0V52Z'/%3E%3Cpath fill='%23003D82' opacity='.42' d='M0 72C81 99 134 120 207 107C274 95 319 73 382 91C402 97 418 107 430 118V154H0V72Z'/%3E%3C/svg%3E");
  }

  body.auth-login-body .branding-side {
    position: relative;
    z-index: 2;
    min-height: auto;
    padding: calc(28px + env(safe-area-inset-top)) 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.auth-login-body .content-wrapper {
    min-height: auto;
    width: 100%;
    max-width: 430px;
    align-items: center;
    justify-content: flex-start;
  }

  body.auth-login-body .brand-identity {
    margin: 0 0 22px;
    display: flex;
    justify-content: center;
  }

  body.auth-login-body .main-logo {
    width: clamp(168px, 45vw, 226px);
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: drop-shadow(0 18px 30px rgba(3, 31, 65, 0.16));
  }

  body.auth-login-body .main-slogan,
  body.auth-login-body .desktop-only-h1,
  body.auth-login-body .desktop-only-p,
  body.auth-login-body .navy-shape {
    display: none !important;
  }

  body.auth-login-body .hero-message {
    width: 100%;
    text-align: center;
    margin: 0;
  }

  body.auth-login-body .mobile-only-header {
    display: block !important;
  }

  body.auth-login-body .mobile-only-header h1 {
    color: #002855;
    font-size: clamp(2.45rem, 10vw, 3.45rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -1.6px;
    margin: 0 0 14px;
  }

  body.auth-login-body .mobile-only-header h1 {
    font-size: 0;
  }

  body.auth-login-body .mobile-only-header h1::before {
    content: "Bem-vindo!";
    font-size: clamp(2.45rem, 10vw, 3.45rem);
  }

  body.auth-login-body .system-badge {
    display: block;
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #687387;
    box-shadow: none;
    font-size: clamp(1rem, 4.5vw, 1.28rem);
    line-height: 1.35;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-transform: none;
    font-size: 0;
  }

  body.auth-login-body .system-badge::before {
    content: "Acesse sua conta para continuar";
    font-size: clamp(1rem, 4.5vw, 1.28rem);
  }

  body.auth-login-body .login-side {
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1;
    min-height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 0 calc(138px + env(safe-area-inset-bottom));
    margin: 0;
  }

  body.auth-login-body .login-side::after {
    content: "Construindo futuros, transformando vidas.";
    white-space: nowrap;
    position: absolute;
    left: 10px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 3;
    color: #ffffff;
    font-size: 0.72rem;
    line-height: 1.26;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.20);
  }

  body.auth-login-body .login-side::before {
    content: "\1F49B";
    position: absolute;
    right: 18px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 3;
    width: auto;
    height: auto;
    background: transparent;
    color: initial;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    display: block;
    font-size: 1.2rem;
    line-height: 1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  }

  body.auth-login-body .auth-card {
    width: min(100%, 430px);
    max-width: 430px;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
  }

  body.auth-login-body .auth-card::before,
  body.auth-login-body .auth-card header {
    display: none;
  }

  body.auth-login-body .login-alert {
    margin: 0 0 18px;
    border-radius: 18px;
    background: #fff7f7;
  }

  body.auth-login-body .input-group {
    margin-bottom: 15px;
  }

  body.auth-login-body .input-group label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  body.auth-login-body .field-wrapper {
    min-height: 72px;
    padding: 0 22px;
    border-radius: 16px;
    border: 1px solid rgba(3, 31, 65, 0.12);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 30px rgba(3, 31, 65, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    gap: 20px;
  }

  body.auth-login-body .field-wrapper:focus-within {
    border-color: rgba(3, 31, 65, 0.34);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(3, 31, 65, 0.08), 0 16px 34px rgba(3, 31, 65, 0.09);
  }

  body.auth-login-body .field-wrapper i {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
    color: #002855;
    opacity: 1;
  }

  body.auth-login-body .field-wrapper input {
    color: #172033;
    padding: 18px 0;
    font-size: 1.05rem;
    font-weight: 500;
  }

  body.auth-login-body .field-wrapper input::placeholder {
    color: #6f7788;
  }

  body.auth-login-body .form-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px;
    margin: 20px 0 26px;
  }

  body.auth-login-body .remember-me {
    color: #1f2633;
    font-size: 0.91rem;
    font-weight: 500;
    gap: 10px;
  }

  body.auth-login-body .remember-me input {
    width: 20px;
    height: 20px;
    accent-color: #002855;
  }

  body.auth-login-body .forgot-pw {
    color: #002855;
    font-size: 0.91rem;
    font-weight: 600;
  }

  body.auth-login-body .btn-submit {
    min-height: 70px;
    border-radius: 16px;
    background: linear-gradient(135deg, #002855 0%, #003d82 100%);
    color: #ffffff;
    border: 0;
    box-shadow: 0 20px 34px rgba(3, 31, 65, 0.24);
    text-transform: none;
    letter-spacing: -0.02em;
    font-size: 1.2rem;
    font-weight: 800;
  }

  body.auth-login-body .btn-submit span {
    font-size: 0;
  }

  body.auth-login-body .btn-submit span::before {
    content: "Entrar";
    font-size: 1.2rem;
  }

  body.auth-login-body .btn-submit i {
    display: none;
  }

  body.auth-login-body .login-form > div[style*="text-align: center"] {
    position: relative;
    margin-top: 34px !important;
    padding-top: 38px !important;
    border-top: 0 !important;
    background:
      linear-gradient(rgba(3, 31, 65, 0.14), rgba(3, 31, 65, 0.14)) left top / calc(50% - 34px) 1px no-repeat,
      linear-gradient(rgba(3, 31, 65, 0.14), rgba(3, 31, 65, 0.14)) right top / calc(50% - 34px) 1px no-repeat;
  }

  body.auth-login-body .login-form > div[style*="text-align: center"]::before {
    content: "ou";
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    padding: 0;
    background: transparent;
    color: #5f6a7b;
    font-size: 1rem;
    font-weight: 500;
    text-transform: lowercase;
  }

  body.auth-login-body .login-form > div[style*="text-align: center"] p {
    display: none;
  }

  body.auth-login-body .login-form > div[style*="text-align: center"] a {
    width: 100%;
    min-height: 64px;
    display: inline-flex !important;
    justify-content: center;
    padding: 0 20px !important;
    border-radius: 16px !important;
    border: 1.8px solid #fdb913 !important;
    background: rgba(255, 255, 255, 0.76) !important;
    color: #002855 !important;
    box-shadow: 0 14px 28px rgba(253, 185, 19, 0.10) !important;
    font-size: 0 !important;
    font-weight: 700 !important;
  }

  body.auth-login-body .login-form > div[style*="text-align: center"] a::before {
    content: "Entrar como Respons\00E1vel";
    font-size: 1.02rem;
  }

  body.auth-login-body .login-form > div[style*="text-align: center"] a i {
    color: #f6aa00;
    width: 22px !important;
    height: 22px !important;
    order: -1;
  }
}

@media (max-width: 520px) {
  body.auth-login-body .portal-login {
    padding-left: 18px;
    padding-right: 18px;
  }

  body.auth-login-body .portal-login::before {
    left: 8px;
    right: 8px;
    height: 276px;
  }

  body.auth-login-body .branding-side {
    padding-top: calc(24px + env(safe-area-inset-top));
    padding-bottom: 16px;
  }

  body.auth-login-body .brand-identity {
    margin-bottom: 18px;
  }

  body.auth-login-body .main-logo {
    width: clamp(150px, 55vw, 214px);
  }

  body.auth-login-body .login-side {
    padding-top: 22px;
  }

  body.auth-login-body .field-wrapper {
    min-height: 68px;
    border-radius: 15px;
  }

  body.auth-login-body .btn-submit {
    min-height: 66px;
  }
}

@media (max-width: 370px) {
  body.auth-login-body .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

