/* ==========================================================================
   Login GoMapsGo — mapa à esquerda, painel de acesso à direita.
   Usa os tokens de gmg-tema.css (claro/escuro). login.js continua igual:
   #m_login alterna .m-login--signin / .m-login--forget-password.
   ========================================================================== */

html, body.gl-body { height: 100%; margin: 0; }
body.gl-body { font-family: var(--gmg-fonte); background: #0b1220; color: var(--gmg-text); overflow: hidden; }
.gl-cena { position: relative; min-height: 100vh; min-height: 100svh; display: flex; }

/* ---------- mapa de fundo (script v5 continua controlando) ---------- */
#bgmap { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.map-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 0% 100%, rgba(11, 18, 32, .82), transparent 55%),
    linear-gradient(90deg, rgba(11, 18, 32, .35) 0%, rgba(11, 18, 32, .05) 55%, rgba(11, 18, 32, .45) 100%);
}

/* ---------- vitrine (texto sobre o mapa) ---------- */
.gl-vitrine {
  position: relative; z-index: 2; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48px 56px; color: #fff; min-width: 0;
}
.gl-vitrine-conteudo { max-width: 520px; animation: glSobe .8s .15s cubic-bezier(.2, .7, .2, 1) both; }
.gl-selo {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
  padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
}
.gl-selo i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); animation: glPulso 2.4s infinite; }
.gl-vitrine h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; font-weight: 600; margin: 18px 0 18px; color: #fff; letter-spacing: -.3px; }
.gl-vitrine ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gl-vitrine li { display: flex; gap: 10px; align-items: center; font-size: 15px; color: rgba(255, 255, 255, .86); }
.gl-vitrine li span { flex: none; width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); font-size: 14px; }
.gl-vitrine li:nth-child(1) { animation: glSobe .7s .35s both; }
.gl-vitrine li:nth-child(2) { animation: glSobe .7s .5s both; }
.gl-vitrine li:nth-child(3) { animation: glSobe .7s .65s both; }
.hint {
  margin-top: 28px; align-self: flex-start; font-size: 12px; color: rgba(255, 255, 255, .75);
  padding: 7px 11px; border-radius: 10px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
}

/* ---------- painel de acesso ---------- */
.gl-painel.card {
  position: relative; z-index: 3; flex: 0 0 min(460px, 42vw); display: flex; align-items: center; justify-content: center;
  padding: 40px 48px; margin: 0; border: 0; border-radius: 0; background: var(--gmg-surface); color: var(--gmg-text);
  box-shadow: -24px 0 60px rgba(0, 0, 0, .25); animation: glEntraPainel .7s cubic-bezier(.2, .7, .2, 1) both;
}
.gl-painel-inner { width: 100%; max-width: 360px; }
.gl-logo { display: block; height: 42px; margin-bottom: 34px; }
.gl-logo-escuro { display: none; }
html[data-tema="escuro"] .gl-logo-claro { display: none; }
html[data-tema="escuro"] .gl-logo-escuro { display: block; }

.gl-painel h1 { font-size: 24px; font-weight: 600; margin: 0 0 6px; color: var(--gmg-text); letter-spacing: -.2px; }
.gl-painel .gl-sub { margin: 0 0 26px; color: var(--gmg-muted); font-size: 14.5px; line-height: 1.5; }

/* alterna entrar / esqueci (antes vinha do CSS do Metronic) */
.m-login--signin .m-login__forget-password,
.m-login--forget-password .m-login__signin { display: none; }
.gl-painel .animated { animation: glTroca .35s ease both !important; }

.gl-campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.gl-campo label { font-size: 13px; font-weight: 500; color: var(--gmg-text-2); margin: 0; }
.gl-entrada { position: relative; display: flex; align-items: center; }
.gl-entrada > i.gl-ico { position: absolute; left: 13px; color: var(--gmg-placeholder); font-size: 18px; pointer-events: none; }
.gl-painel .gl-entrada input.form-control {
  height: 48px !important; padding: 0 44px 0 40px !important; font-size: 15px !important;
  border-radius: 12px !important; border: 1px solid var(--gmg-border-forte) !important;
  background: var(--gmg-surface) !important; color: var(--gmg-text) !important; transition: border-color .15s, box-shadow .15s;
}
.gl-painel .gl-entrada input.form-control:focus { border-color: var(--gmg-primary) !important; box-shadow: var(--gmg-foco) !important; }
.gl-olho {
  position: absolute; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent;
  color: var(--gmg-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.gl-olho:hover { background: var(--gmg-hover); color: var(--gmg-text); }
.gl-erro { color: var(--gmg-danger); font-size: 12.5px; min-height: 0; }
.gl-erro:empty { display: none; }

.gl-linha { display: flex; justify-content: flex-end; margin: -4px 0 22px; }
.gl-link { color: var(--gmg-primary) !important; font-size: 13.5px; font-weight: 500; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.gl-link:hover { text-decoration: underline; }

.gl-btn {
  width: 100%; height: 48px; border: 0; border-radius: 12px; background: var(--gmg-primary); color: var(--gmg-primary-texto);
  font-size: 15.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .1s, box-shadow .15s; box-shadow: 0 8px 22px rgba(79, 91, 213, .28);
}
.gl-btn:hover { background: var(--gmg-primary-hover); }
.gl-btn:active { transform: translateY(1px); }
.gl-btn:disabled { opacity: .7; cursor: wait; }
.gl-btn.m-loader::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: glGira .7s linear infinite; position: static !important; margin: 0 !important; }
.gl-btn-sec { margin-top: 10px; background: transparent; color: var(--gmg-text-2); box-shadow: none; border: 1px solid var(--gmg-border-forte); }
.gl-btn-sec:hover { background: var(--gmg-hover); color: var(--gmg-text); }

.gl-painel .alert { border-radius: 12px; font-size: 13.5px; padding: 10px 36px 10px 12px; margin-bottom: 16px; border: 0; }
.gl-painel .alert .close { padding: 8px 10px; }

.gl-rodape { margin-top: 30px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--gmg-muted); }
.gl-rodape a { color: var(--gmg-muted); text-decoration: none; }
.gl-rodape a:hover { color: var(--gmg-text); }
.gl-tema {
  border: 1px solid var(--gmg-border); background: var(--gmg-surface-2); color: var(--gmg-text-2);
  height: 32px; padding: 0 10px; border-radius: 9px; cursor: pointer; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px;
}

/* ---------- animações ---------- */
@keyframes glSobe { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes glEntraPainel { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes glTroca { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes glPulso { 0%, 100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); } 50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }
@keyframes glGira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .gl-vitrine-conteudo, .gl-vitrine li, .gl-painel.card, .gl-painel .animated { animation: none !important; }
}

/* ---------- celular e tablet ---------- */
@media (max-width: 900px) {
  body.gl-body { overflow: auto; }
  .gl-cena { flex-direction: column; justify-content: flex-end; }
  .gl-vitrine { flex: 1 1 auto; padding: 28px 22px 18px; justify-content: flex-end; }
  .gl-vitrine h2 { font-size: 24px; margin: 12px 0 0; }
  .gl-vitrine ul, .hint { display: none; }
  .gl-painel.card {
    flex: 0 0 auto; width: 100%; padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0; box-shadow: 0 -18px 50px rgba(0, 0, 0, .3); animation-name: glSobe;
  }
  .gl-logo { height: 34px; margin-bottom: 22px; }
  .gl-painel h1 { font-size: 21px; }
  .gl-painel .gl-sub { margin-bottom: 20px; }
}

/* campos ocupam a largura toda */
.gl-entrada > input.form-control { flex: 1 1 auto; width: 100% !important; min-width: 0; }

/* balão "Você está em…" do mapa no estilo da tela */
#bgmap .gm-style .gm-style-iw-c { background: rgba(15, 23, 42, .78) !important; color: #fff !important; border-radius: 12px !important; backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35) !important; padding: 10px 14px !important; }
#bgmap .gm-style .gm-style-iw-d { overflow: hidden !important; color: #fff !important; }
#bgmap .gm-style .gm-style-iw-d * { color: #fff !important; }
#bgmap .gm-style .gm-style-iw-tc::after { background: rgba(15, 23, 42, .78) !important; }
#bgmap .gm-style .gm-style-iw-chr, #bgmap .gm-style button.gm-ui-hover-effect { display: none !important; }

/* largura certa no celular (padding dentro da largura) e sem rolagem lateral */
.gl-cena, .gl-cena * { box-sizing: border-box; }
html, body.gl-body { overflow-x: hidden; }
.gl-cena { overflow: hidden; max-width: 100vw; }

/* botão de fechar dos avisos: o login.js cria o botão vazio (o ícone vinha de uma fonte que esta tela não usa) */
.gl-painel .alert { position: relative; }
.gl-painel .alert .close {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; padding: 0 !important; margin: 0;
  border: 0; border-radius: 8px; background: transparent; color: inherit; opacity: .65; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0; line-height: 1; text-shadow: none; box-shadow: none;
}
.gl-painel .alert .close::before { content: "\00d7"; font-size: 20px; font-family: var(--gmg-fonte); font-weight: 400; }
.gl-painel .alert .close::after { display: none !important; }
.gl-painel .alert .close:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
