@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --primary: #3b6ef8;
  --primary-hover: #2d5ce0;
  --text: #1a1f36;
  --muted: #6b7280;
  --border: #e0e4ee;
  --input-bg: #f7f9fc;
  --shadow: 0 8px 40px rgba(59,110,248,0.08), 0 2px 12px rgba(0,0,0,0.06);
  --radius: 16px;
  --font: 'DM Sans', sans-serif;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 50%, rgba(59,110,248,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59,110,248,0.04) 0%, transparent 40%);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--text);
}

/* ── TOPBAR ────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 28px;
  position: relative;
}

.topbar-home {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color:var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
}
.topbar-home:hover {
  background: rgba(206, 206, 206, 0.08);
  color: var(--primary);
}
.topbar-home img {
  width: 18px;
  height: 18px;
  opacity:1;
  filter: none;
}

/* ── MAIN AREA ─────────────────────────────── */
.login-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* geometric mesh background lines */
.login-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,110,248,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,110,248,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  pointer-events: none;
}

/* ── CARD ──────────────────────────────────── */
.login-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 40px 36px;
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: cardIn 0.4s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
 position: absolute;
  top: 10px;
  left: 12px;
  height: 65px;
  width: auto;
}

.login-title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

/* ── FORM FIELDS ───────────────────────────── */
.field-group {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

.field-input {
width: 137%;
  box-sizing: border-box;
  padding: 15px 50px 15px 30px;
  border: 1.5px solid var(--border);
  border-radius: 29px;
  background: white;
  font-family: var(--font);
  font-size: 16px;
  color: black;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,110,248,0.12);
  background: #fff;
}
.field-input::placeholder {
  color: #cacaca;
}

/* ── RECAPTCHA ─────────────────────────────── */
.recaptcha-wrap {
  margin: 18px 0 4px;
  display: flex;
  justify-content: center;
  margin-right: -98px;
}

/* ── ERROR ─────────────────────────────────── */
.login-error {
  text-align: center;
  font-size: 15px;
  color: #f00;
  min-height: 18px;
  margin-bottom: 9px;
  margin-left: 86px;
}

/* ── BUTTON ────────────────────────────────── */
.btn-login {
  display: block;
  width: 137%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 29px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 4px 14px rgba(59,110,248,0.3);
}
.btn-login:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(59,110,248,0.4);
  transform: translateY(-1px);
}
.btn-login:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.footer-text {
  position: fixed;
  bottom: 15px;
  right: 20px;
  font-size: 13px;
  color: #000000;
}

.senha-wrap{
   position: relative;
  width: 100%;
}

.toggle-senha{
   position: absolute;
  right: -85px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
    
}

.toggle-senha svg{
    display: block;
}

@media screen and (max-width: 1000px) and (orientation: portrait) {
    /* ── MEDIA QUERIES (MOBILE OPTIMIZATION) ───────────────── */

  /* 2. Ajustes de tela e margens seguras (Notches do iPhone/Android) */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* Como usamos fixed no html/body, mantemos o flex layout intacto */
  }

  /* 2. Topbar: Otimização de espaço */
  .topbar {
    padding: 12px 16px;

  }

  .topbar-home {
    font-size: 40px;
    padding: 8px 12px; /* Aumenta a área de clique/toque */
    z-index:9999
  }

  /* 3. Área Principal e Background */
  .login-wrapper {
    padding: 16px;
    margin-top: -150px;
  }

  /* Diminui a escala da malha de fundo para não ficar desproporcional */
  .login-wrapper::before {
    background-size: 40px 40px;
  }



  .login-logo {
    height: 120px; /* Logo levemente menor */
    margin-bottom: 16px;
  }

  .login-title {
    font-size: 40px;
    margin-bottom: 24px;
  }

  /* 5. Inputs e Formulário */
  .field-group {
    margin-bottom: 14px;
  }

  .field-input {
    /* CRÍTICO: 16px previne o zoom automático no Safari do iOS ao focar no input */
   font-size: 30px;
    padding: 27px 20px;
    width: 90vw;
  }

  .field-label {
    font-size: 35px;
  }
  .toggle-senha {
 right: 17px;
  }
  .toggle-senha svg {
  display: block;
  width: 44px !important;
  height: 57px !important;
  }

  /* 6. reCAPTCHA: Evita quebra de layout em telas pequenas */
  .recaptcha-wrap {
    transform: scale(1.8); /* Aumenta 15%. Mude para 1.20 se quiser maior */
    transform-origin: center center;
    margin-top: 70px;
    margin-bottom: 44px; 
    margin-right: -21px;
  }

  /* 7. Botão Principal: Área de toque otimizada */
  .btn-login {
    padding: 22px;
    font-size: 35px;
  width: 90vw;
  }

  /* 8. Footer: Empilhamento vertical e centralização */
  .site-footer {
    justify-content: center;
    text-align: center;
    padding: 21px;
    gap: 12px;
  }

  .footer-text {
    font-size: 30px;
    line-height: 1.5;
    right: 55px;
  }
  .site-footer img {
  height: 50px;
  width: auto;
}

  .topbar-home img {
  width: 50px;
  height: 50px;
  opacity: 1;
  filter: none;
  }


}