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

:root {
  --navy: #1a2b4b;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-soft: #eff6ff;
  --green: rgba(22, 101, 52, 0.48);;
  --green-border: 1px solid rgba(74, 222, 128, 0.55);
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --white: #ffffff;
  --error: #ef4444;
  --glass: rgba(255, 255, 255, 0.50);
  --glass-strong: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(255, 255, 255, 0.62);
  --radius-input: 12px;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  background: #d4dce8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.2vh, 28px) clamp(14px, 2.2vw, 28px);
  min-height: 100dvh;
}

/* ── CONTORNO EXTERNO (sem foto) ── */
.login-page {
  width: 100%;
  height: 100%;
  max-width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.login-frame {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: calc(100dvh - clamp(28px, 4.4vh, 56px));
  border-radius: 32px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 1px rgba(15, 35, 71, 0.05),
    0 28px 72px rgba(15, 35, 71, 0.14),
    0 8px 24px rgba(15, 35, 71, 0.06);
}

/* ── CENA DENTRO DO CONTORNO ── */
.login-scene-bg {
  position: absolute;
  inset: 0;
  background: url("../img/login-paulo-afonso-2.png") center center / cover no-repeat;
  filter: saturate(1.04) brightness(1.03);
  transform: scale(1.03);
}

/* blur horizontal — forte à esquerda, nenhum à direita (fade suave) */
.login-blur-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.login-blur-gradient .blur-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-blur-gradient .blur-layer--tint {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.20) 0%,
      rgba(255, 255, 255, 0.10) 16%,
      rgba(255, 255, 255, 0.04) 36%,
      rgba(255, 255, 255, 0.01) 50%,
      transparent 62%,
      transparent 100%);
}

.login-blur-gradient .blur-layer--1 {
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  -webkit-mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.58) 10%,
      rgba(0, 0, 0, 0.38) 22%,
      rgba(0, 0, 0, 0.18) 34%,
      rgba(0, 0, 0, 0.08) 44%,
      rgba(0, 0, 0, 0.05) 50%,
      rgba(0, 0, 0, 0.02) 58%,
      transparent 66%,
      transparent 100%);
  mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.58) 10%,
      rgba(0, 0, 0, 0.38) 22%,
      rgba(0, 0, 0, 0.18) 34%,
      rgba(0, 0, 0, 0.08) 44%,
      rgba(0, 0, 0, 0.05) 50%,
      rgba(0, 0, 0, 0.02) 58%,
      transparent 66%,
      transparent 100%);
}

.login-blur-gradient .blur-layer--2 {
  backdrop-filter: blur(14px) saturate(1.07);
  -webkit-backdrop-filter: blur(14px) saturate(1.07);
  -webkit-mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.42) 12%,
      rgba(0, 0, 0, 0.24) 26%,
      rgba(0, 0, 0, 0.10) 38%,
      rgba(0, 0, 0, 0.05) 48%,
      rgba(0, 0, 0, 0.03) 54%,
      transparent 64%,
      transparent 100%);
  mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.42) 12%,
      rgba(0, 0, 0, 0.24) 26%,
      rgba(0, 0, 0, 0.10) 38%,
      rgba(0, 0, 0, 0.05) 48%,
      rgba(0, 0, 0, 0.03) 54%,
      transparent 64%,
      transparent 100%);
}

.login-blur-gradient .blur-layer--3 {
  backdrop-filter: blur(26px) saturate(1.09);
  -webkit-backdrop-filter: blur(26px) saturate(1.09);
  -webkit-mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.38) 0%,
      rgba(0, 0, 0, 0.26) 14%,
      rgba(0, 0, 0, 0.12) 30%,
      rgba(0, 0, 0, 0.05) 42%,
      rgba(0, 0, 0, 0.03) 50%,
      rgba(0, 0, 0, 0.015) 56%,
      transparent 62%,
      transparent 100%);
  mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.38) 0%,
      rgba(0, 0, 0, 0.26) 14%,
      rgba(0, 0, 0, 0.12) 30%,
      rgba(0, 0, 0, 0.05) 42%,
      rgba(0, 0, 0, 0.03) 50%,
      rgba(0, 0, 0, 0.015) 56%,
      transparent 62%,
      transparent 100%);
}

.login-blur-gradient .blur-layer--4 {
  backdrop-filter: blur(38px) saturate(1.1);
  -webkit-backdrop-filter: blur(38px) saturate(1.1);
  -webkit-mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.22) 0%,
      rgba(0, 0, 0, 0.15) 16%,
      rgba(0, 0, 0, 0.07) 32%,
      rgba(0, 0, 0, 0.03) 44%,
      rgba(0, 0, 0, 0.01) 52%,
      transparent 58%,
      transparent 100%);
  mask-image: linear-gradient(90deg,
      rgba(0, 0, 0, 0.22) 0%,
      rgba(0, 0, 0, 0.15) 16%,
      rgba(0, 0, 0, 0.07) 32%,
      rgba(0, 0, 0, 0.03) 44%,
      rgba(0, 0, 0, 0.01) 52%,
      transparent 58%,
      transparent 100%);
}

/* ── LAYOUT ── */
.login-layout {
  position: relative;
  z-index: 5;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.login-left {
  flex: 1 1 52%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vh, 48px) clamp(28px, 4vw, 56px) clamp(24px, 3vh, 40px);
  padding-top: max(clamp(28px, 4vh, 48px), var(--pm-safe-top, env(safe-area-inset-top)));
}

.login-left-glass {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 520px;
  padding: 8px 0;
}

.login-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 2vh, 20px);
  padding: clamp(8px, 2vh, 24px) 0;
}

@keyframes login-status-pulse {

  0%,
  100% {
    opacity: 1;
    box-shadow:
      0 0 0 3px rgba(16, 185, 129, 0.18),
      0 0 6px rgba(16, 185, 129, 0.35);
  }

  50% {
    opacity: 0.55;
    box-shadow:
      0 0 0 5px rgba(16, 185, 129, 0.08),
      0 0 14px rgba(16, 185, 129, 0.55);
  }
}

.login-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid rgba(16, 185, 129, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #047857;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  width: fit-content;
  box-shadow: 0 4px 16px rgba(15, 35, 71, 0.05);
}

.login-hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  border: var(--green-border);

  box-shadow:
    0 0 0 3px rgba(16, 185, 129, 0.18),
    0 0 6px rgba(16, 185, 129, 0.35);
  animation: login-status-pulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .login-hero-badge::before {
    animation: none;
  }
}

.login-hero-logo {
  display: none;
  width: min(220px, 62vw);
  height: auto;
  object-fit: contain;
  margin: 0 auto 10px;
}

.login-hero h1 {
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.login-hero h1 .title-brand {
  display: block;
}

.login-hero h1 .title-accent {
  display: block;
  color: var(--blue);
  font-size: clamp(32px, 3.8vw, 46px);
  margin-top: 4px;
}

.login-dots {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.login-hero>p {
  font-size: clamp(14px, 1.5vw, 16px);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.65;
  max-width: 420px;
}

/* ── RIGHT PANEL ── */
.login-right {
  flex: 1 1 48%;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 3vh, 40px) clamp(28px, 4vw, 64px);
  padding-bottom: max(clamp(24px, 3vh, 40px), env(safe-area-inset-bottom));
}

.login-form-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.46);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow:
    0 24px 56px rgba(15, 35, 71, 0.11),
    0 6px 20px rgba(15, 35, 71, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  padding: clamp(28px, 3.5vh, 36px) clamp(28px, 3vw, 36px) clamp(24px, 3vh, 30px);
}

.login-form-header {
  margin-bottom: 26px;
}

.login-form-header h2 {
  font-size: clamp(24px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.login-form-header p, .login-or p {
  font-size: 14px;
  color: #ffffff;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-icon {
  position: absolute;
  left: 14px;
  color: var(--gray-400);
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.form-input {
  width: 100%;
  padding: 13px 44px;
  border: 1.5px solid #e8ecf2;
  border-radius: var(--radius-input);
  font-size: 14px;
  font-family: inherit;
  background: rgba(249, 250, 251, 0.9);
  color: var(--gray-800);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-input-wrap:focus-within .form-input-icon {
  color: var(--blue);
}

.form-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.form-row-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 22px;
  flex-wrap: wrap;
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  user-select: none;
}

.remember-me input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.error-msg {
  display: none;
  font-size: 12px;
  color: var(--error);
  margin-top: 8px;
  font-weight: 500;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.error-msg.show {
  display: flex;
  animation: shake 0.35s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.login-btn {
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-input);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.15s;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.30);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.36);
  filter: brightness(1.02);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.login-btn .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.login-btn.loading .btn-text,
.login-btn.loading .btn-icon {
  display: none;
}

.login-btn.loading .btn-spinner {
  display: block;
}

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

.login-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 500;
}

.login-or::before,
.login-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8ecf2;
}

.login-btn-gov {
  width: 100%;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
  border: 1.5px solid #e8ecf2;
  border-radius: var(--radius-input);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.login-btn-gov:hover {
  border-color: #cbd5e1;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(15, 35, 71, 0.06);
}

.gov-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.login-page-footer {
  position: absolute;
  right: clamp(24px, 3vw, 48px);
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
}

.login-a2hs-link {
  display: none;
}

.login-a2hs-modal {
  display: none;
}

.login-a2hs-modal:not([hidden]) {
  display: block;
}

.login-page-footer svg {
  opacity: 0.88;
  color: #ffffff;
}

/* ── MOBILE ── */
@media (max-width: 960px) {

  html,
  body {
    overflow: hidden;
    padding: 0;
    height: 100%;
    height: 100dvh;
    background: #ffffff;
  }

  .login-page {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .login-frame {
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #ffffff;
    overflow: hidden;
  }

  /* Sem foto de Paulo Afonso — fundo branco + blur azul suave */
  .login-scene-bg {
    display: none;
  }

  .login-dots {
    display: block;
    background-image:
      radial-gradient(circle, rgba(37, 99, 235, 0.28) 1.4px, transparent 1.5px),
      radial-gradient(circle, rgba(59, 130, 246, 0.16) 1px, transparent 1.2px),
      radial-gradient(circle, rgba(37, 99, 235, 0.12) 2px, transparent 2.2px);
    background-size: 26px 26px, 42px 42px, 64px 64px;
    background-position: 0 0, 13px 18px, 8px 30px;
    opacity: 0.7;
  }

  .login-blur-gradient .blur-layer--1,
  .login-blur-gradient .blur-layer--2,
  .login-blur-gradient .blur-layer--3,
  .login-blur-gradient .blur-layer--4 {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .login-blur-gradient .blur-layer--1 {
    background:
      radial-gradient(ellipse 90% 55% at 50% -10%, rgba(37, 99, 235, 0.18), transparent 70%),
      radial-gradient(ellipse 70% 45% at 100% 80%, rgba(59, 130, 246, 0.12), transparent 65%);
    backdrop-filter: blur(28px) saturate(1.05);
    -webkit-backdrop-filter: blur(28px) saturate(1.05);
  }

  .login-blur-gradient .blur-layer--2 {
    background:
      radial-gradient(ellipse 60% 40% at 0% 100%, rgba(37, 99, 235, 0.10), transparent 60%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
  }

  .login-blur-gradient .blur-layer--3,
  .login-blur-gradient .blur-layer--4 {
    display: none;
  }

  .login-blur-gradient .blur-layer--tint {
    background: linear-gradient(180deg,
        rgba(239, 246, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.35) 42%,
        rgba(255, 255, 255, 0.15) 100%);
  }

  .login-layout {
    flex-direction: column;
    height: 100%;
    min-height: 100dvh;
    overflow: hidden;
    /* WebView/PWA: bloco logo+card quase ao centro vertical */
    justify-content: center;
    align-items: stretch;
    padding-top: max(28px, calc(var(--pm-safe-top, env(safe-area-inset-top, 0px)) + 16px));
    padding-bottom: max(52px, calc(env(safe-area-inset-bottom, 0px) + 40px));
    gap: 12px;
  }

  @media (display-mode: standalone),
    (display-mode: fullscreen) {
    .login-layout {
      padding-top: max(40px, calc(var(--pm-safe-top, env(safe-area-inset-top, 0px)) + 24px));
      padding-bottom: max(64px, calc(env(safe-area-inset-bottom, 0px) + 48px));
    }
  }

  .login-left {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 24px 0;
    padding-bottom: 0;
  }

  .login-left-glass {
    max-width: none;
    align-items: center;
    padding: 0;
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .login-hero {
    flex: 0 0 auto;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 0;
    min-height: 0;
    width: 100%;
    padding: 0 0 10px;
  }

  .login-hero-badge {
    display: none;
  }

  .login-hero-logo {
    display: block;
    width: min(260px, 72vw);
    max-width: 260px;
    margin: 0 auto;
    flex-shrink: 0;
  }

  .login-hero h1,
  .login-hero>p {
    display: none;
  }

  .login-right {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 0 20px;
    justify-content: center;
    overflow: visible;
    min-height: 0;
  }

  .login-form-card {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(37, 99, 235, 0.10);
    box-shadow:
      0 16px 40px rgba(15, 35, 71, 0.08),
      0 4px 14px rgba(37, 99, 235, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 22px 22px 18px;
  }

  .login-form-header {
    margin-bottom: 20px;
  }

  .login-a2hs-link {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px 8px;
    border: 0;
    background: transparent;
    color: var(--blue);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 5;
  }

  .login-a2hs-link:hover,
  .login-a2hs-link:focus-visible {
    color: #1d4ed8;
    outline: none;
  }

  .login-a2hs-link[hidden] {
    display: none !important;
  }

  .login-form-card {
    overflow: visible;
  }

  .login-a2hs-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
  }

  .login-a2hs-modal[hidden] {
    display: none !important;
  }

  .login-a2hs-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
  }

  .login-a2hs-modal__sheet {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    background: #ffffff;
    border-radius: 20px;
    padding: 22px 20px 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  }

  .login-a2hs-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }

  .login-a2hs-modal__sheet h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    margin: 0 36px 14px 0;
  }

  .login-a2hs-modal__steps {
    margin: 0 0 16px;
    padding-left: 18px;
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.55;
  }

  .login-a2hs-modal__steps li + li {
    margin-top: 8px;
  }

  .login-a2hs-modal__cta {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    background: var(--blue);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
  }

  .login-a2hs-modal__cta[hidden] {
    display: none !important;
  }

  .login-form-header p {
    color: var(--gray-600);
  }

  .login-or,
  .login-btn-gov {
    display: none;
  }

  .login-page-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: max(10px, env(safe-area-inset-bottom));
    text-align: center;
    justify-content: center;
    color: var(--gray-500);
  }

  .login-page-footer svg {
    color: var(--gray-500);
    opacity: 0.7;
  }

  .form-input {
    font-size: 16px;
    min-height: 50px;
  }
}

@media (max-width: 400px) {
  .form-row-options {
    flex-direction: column;
    align-items: flex-start;
  }
}
.login-back {
  display: none;
}

/* ── CELULAR: mesmo modelo do app (folha branca inferior, Roboto, azul #2476ce) ──
   A página rola: com o teclado aberto, os campos e o botão Entrar continuam alcançáveis. */
@media (max-width: 767px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f5f6f8;
  }

  body {
    display: block;
    padding: 0;
    min-height: 100dvh;
    font-family: "Roboto", system-ui, -apple-system, sans-serif;
    color: #172438;
  }

  .login-page {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .login-frame {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    background: linear-gradient(180deg, #eaf3ff 0%, #f5f6f8 320px);
  }

  .login-dots,
  .login-blur-gradient {
    display: none;
  }

  .login-back {
    position: absolute;
    top: calc(var(--pm-safe-top, env(safe-area-inset-top, 0px)) + 12px);
    left: 12px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 40px;
    padding: 0 14px 0 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(23, 46, 77, 0.1);
    color: #172438;
    font: 500 15px/1 "Roboto", sans-serif;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .login-back:active {
    background: #e6edf5;
  }

  .login-layout {
    flex: 1 0 auto;
    height: auto;
    min-height: 0;
    overflow: visible;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
  }

  .login-left {
    padding: calc(var(--pm-safe-top, env(safe-area-inset-top, 0px)) + 72px) 24px 28px;
  }

  .login-hero {
    padding: 0;
  }

  .login-hero-logo {
    width: min(240px, 66vw);
  }

  .login-right {
    flex: 1 0 auto;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
  }

  .login-form-card {
    flex: 1 0 auto;
    max-width: none;
    padding: 28px 20px 8px;
    border: 0;
    border-radius: 28px 28px 0 0;
    background: #ffffff;
    box-shadow: 0 -8px 32px rgba(23, 46, 77, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .login-form-header {
    margin-bottom: 22px;
  }

  .login-form-header h2 {
    margin-bottom: 6px;
    font: 600 24px/1.25 "Roboto", sans-serif;
    letter-spacing: 0;
    color: #172438;
  }

  .login-form-header p {
    font-size: 15px;
    color: #65798f;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-label {
    font: 500 14px/1.3 "Roboto", sans-serif;
    color: #172438;
  }

  .form-input {
    min-height: 52px;
    padding: 0 48px 0 46px;
    border: 1px solid #e1e8f0;
    border-radius: 14px;
    background: #f5f6f8;
    font: 400 16px "Roboto", sans-serif;
    color: #172438;
  }

  .form-input::placeholder {
    color: #8a9bb0;
  }

  .form-input:focus {
    border-color: #2476ce;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(36, 118, 206, 0.14);
  }

  .form-input-icon {
    color: #8a9bb0;
  }

  .form-input-wrap:focus-within .form-input-icon {
    color: #2476ce;
  }

  .password-toggle {
    right: 4px;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    color: #8a9bb0;
  }

  .error-msg {
    font-size: 14px;
    color: #c2412d;
  }

  .form-row-options {
    margin: 4px 0 22px;
  }

  .remember-me {
    gap: 10px;
    min-height: 44px;
    font-size: 15px;
    color: #65798f;
  }

  .remember-me input {
    width: 20px;
    height: 20px;
    accent-color: #2476ce;
  }

  .forgot-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font: 500 15px "Roboto", sans-serif;
    color: #2476ce;
  }

  .login-btn {
    min-height: 54px;
    border-radius: 27px;
    background: #2476ce;
    box-shadow: 0 6px 16px rgba(36, 118, 206, 0.28);
    font: 500 16px "Roboto", sans-serif;
    -webkit-tap-highlight-color: transparent;
  }

  .login-btn:hover {
    transform: none;
    filter: none;
    box-shadow: 0 6px 16px rgba(36, 118, 206, 0.28);
  }

  .login-btn:active {
    background: #1f69b8;
  }

  .login-a2hs-link {
    min-height: 48px;
    margin-top: 8px;
    font: 500 15px "Roboto", sans-serif;
    color: #2476ce;
    text-decoration: none;
  }

  .login-page-footer {
    position: static;
    padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    font: 400 12px/1.4 "Roboto", sans-serif;
    color: #8a9bb0;
  }

  /* App instalado no iPhone (iOS 26): 100dvh para antes do fim da tela e sobra uma faixa pintada com o
     fundo do documento. 100vh vai até a borda física; o fundo branco, igual ao rodapé, cobre o resto. */
  @media (display-mode: standalone) {
    html,
    body {
      background: #ffffff;
    }

    body,
    .login-page,
    .login-frame {
      min-height: 100vh;
    }
  }

  .login-page-footer svg {
    display: none;
  }

  .login-a2hs-modal__sheet {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 28px 28px 0 0;
    font-family: "Roboto", sans-serif;
  }

  .login-a2hs-modal__sheet h3 {
    font-weight: 600;
    color: #172438;
  }

  .login-a2hs-modal__cta {
    min-height: 52px;
    border-radius: 26px;
    background: #2476ce;
    font: 500 16px "Roboto", sans-serif;
  }
}
