/**
 * LUPA — tela de login (portal)
 * Modo --art: imagem de referência como fundo; só o card de login em HTML.
 */
:root {
  --lupa-login-navy: #071220;
  --lupa-login-navy-mid: #0c1f3a;
  --lupa-login-blue: #3b82f6;
  --lupa-login-blue-bright: #60a5fa;
  --lupa-login-glass: rgba(30, 58, 95, 0.55);
  --lupa-login-border: rgba(96, 165, 250, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.lupa-login-page {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #e2e8f0;
  background: var(--lupa-login-navy);
}

/* —— Fundo com arte de referência (proporção preservada) —— */
.lupa-login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 30% 20%, #0f2744 0%, #0a1628 45%, #050d18 100%);
}

.lupa-login-page--art .lupa-login-bg-photo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.lupa-login-page--art .lupa-login-bg-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: top center;
}

.lupa-login-page--art .lupa-login-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, transparent 50%, rgba(6, 14, 28, 0.2) 70%, rgba(8, 18, 36, 0.38) 100%),
    linear-gradient(180deg, transparent 75%, rgba(5, 13, 24, 0.5) 100%);
}

.lupa-login-spacer {
  min-width: 0;
}

/* —— Shell: cabe em 100vh —— */
.lupa-login-shell {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lupa-login-main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(0.75rem, 2vh, 1.5rem) clamp(1.25rem, 3vw, 2.5rem) 0.35rem;
}

.lupa-login-page--art .lupa-login-main {
  max-width: none;
  width: 100%;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: clamp(1.5rem, 4vh, 2.5rem) clamp(10rem, 17.6vw, 14rem) clamp(4.5rem, 10vh, 6rem) clamp(1.25rem, 2.5vw, 2rem);
  gap: 0;
}

.lupa-login-page--art .lupa-login-panel {
  justify-content: flex-end;
  justify-self: end;
  align-self: center;
  width: min(380px, 34vw);
  min-width: 300px;
  margin-right: clamp(6rem, 12vw, 10rem);
  padding-right: 0;
  transform: translateY(calc(-0.1 * (100dvh - 11rem)));
}

/* —— Coluna esquerda —— */
.lupa-login-hero {
  padding-right: 0.5rem;
  min-width: 0;
}

.lupa-login-hero-logo {
  display: block;
  width: min(200px, 42vw);
  height: auto;
  margin-bottom: clamp(0.5rem, 1.5vh, 1rem);
  filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.3));
}

.lupa-login-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.lupa-login-hero h1 .hl {
  color: var(--lupa-login-blue-bright);
  text-shadow: 0 0 32px rgba(59, 130, 246, 0.35);
}

.lupa-login-hero-lead {
  margin: 0 0 clamp(0.65rem, 1.5vh, 1.1rem);
  max-width: 480px;
  font-size: clamp(0.8rem, 1.1vw, 0.88rem);
  line-height: 1.45;
  color: #94a3b8;
}

.lupa-login-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 520px;
}

.lupa-login-feature {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(6px);
}

.lupa-login-feature-icon {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
}

.lupa-login-feature-icon.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.lupa-login-feature-icon.green { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.lupa-login-feature-icon.purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.lupa-login-feature-icon.pink { background: rgba(236, 72, 153, 0.2); color: #f472b6; }

.lupa-login-feature h3 {
  margin: 0 0 0.15rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f1f5f9;
}

.lupa-login-feature p {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.35;
  color: #64748b;
}

/* —— Card login (único, lado direito) —— */
.lupa-login-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.lupa-login-card {
  width: 100%;
  max-width: 360px;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: 16px;
  background: rgba(51, 78, 120, 0.42);
  border: 1px solid var(--lupa-login-border);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 20px 40px -12px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lupa-login-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
}

.lupa-login-card-sub {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #b8c5d6;
}

.lupa-login-flash {
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  text-align: center;
}

.lupa-login-flash.danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

.lupa-login-flash.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}

.lupa-login-flash.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #bfdbfe;
}

.lupa-login-field {
  margin-bottom: 0.85rem;
}

.lupa-login-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #dbe4f0;
}

.lupa-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lupa-login-input-wrap > i.fa {
  position: absolute;
  left: 0.75rem;
  color: #7c8fa8;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 1;
}

.lupa-login-input-wrap input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 2.25rem;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.lupa-login-input-wrap input::placeholder {
  color: #6b7f96;
}

.lupa-login-input-wrap input:focus {
  border-color: var(--lupa-login-blue);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.lupa-login-toggle-pw {
  position: absolute;
  right: 0.4rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #7c8fa8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.lupa-login-toggle-pw:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}

.lupa-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.74rem;
}

.lupa-login-remember {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #a8b8cc;
  cursor: pointer;
  user-select: none;
}

.lupa-login-remember input {
  width: 0.9rem;
  height: 0.9rem;
  accent-color: var(--lupa-login-blue);
}

.lupa-login-forgot {
  color: var(--lupa-login-blue-bright);
  text-decoration: none;
  font-weight: 500;
}

.lupa-login-forgot:hover {
  text-decoration: underline;
}

.lupa-login-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.lupa-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.5);
}

.lupa-login-submit:active {
  transform: translateY(0);
}

.lupa-login-card-foot {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  font-size: 0.68rem;
  color: #8b9cb0;
}

.lupa-login-card-foot a {
  color: var(--lupa-login-blue-bright);
  text-decoration: none;
}

.lupa-login-card-foot a:hover {
  text-decoration: underline;
}

.lupa-login-input-wrap--autocomplete {
  position: relative;
  z-index: 2;
}

.lupa-login-ac-results {
  position: relative;
  z-index: 30;
  margin-top: 0.35rem;
  max-height: 180px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
}

.lupa-login-ac-item {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  font-size: 0.85rem;
  color: #0f172a;
  cursor: pointer;
}

.lupa-login-ac-item:last-child {
  border-bottom: none;
}

.lupa-login-ac-item:hover {
  background: #eff6ff;
}

.lupa-login-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 0.65rem;
  font-size: 0.65rem;
  color: #7c8fa8;
}

/* —— Barra de indicadores (HTML real) —— */
.lupa-login-stats {
  flex-shrink: 0;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 2.5rem) 0.25rem;
}

.lupa-login-stats-inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(8px);
}

.lupa-login-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.lupa-login-stat > i,
.lupa-login-stat .lupa-ifood-mark {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--lupa-login-blue-bright);
}

.lupa-login-stat .lupa-ifood-mark {
  font-weight: 800;
  font-style: italic;
  color: #ea1d2c;
  font-size: 0.75rem;
  letter-spacing: -0.02em;
}

.lupa-login-stat strong {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.2;
}

.lupa-login-stat span {
  display: block;
  font-size: 0.58rem;
  color: #64748b;
  line-height: 1.25;
}

/* —— Rodapé legal —— */
.lupa-login-legal {
  flex-shrink: 0;
  padding: 0.35rem clamp(1.25rem, 3vw, 2.5rem) 0.5rem;
  text-align: center;
}

.lupa-login-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.65rem;
  color: #64748b;
}

.lupa-login-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.lupa-login-trust .sep {
  color: #334155;
}

.lupa-login-copy {
  margin: 0;
  font-size: 0.6rem;
  color: #475569;
}

/* —— Responsivo: scroll permitido em telas pequenas —— */
@media (max-width: 1024px) {
  html,
  body.lupa-login-page {
    overflow: auto;
    min-height: 100%;
    height: auto;
  }

  .lupa-login-shell {
    height: auto;
    max-height: none;
    min-height: 100dvh;
    overflow: visible;
  }

  .lupa-login-main {
    grid-template-columns: 1fr;
    padding: 1rem 1.25rem 0.5rem;
  }

  .lupa-login-page--art .lupa-login-main {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 1.25rem 1rem 2rem;
  }

  .lupa-login-page--art .lupa-login-bg-photo img {
    object-position: top center;
  }

  .lupa-login-page--art .lupa-login-bg-overlay {
    background: linear-gradient(180deg, rgba(6, 14, 28, 0.2) 0%, rgba(8, 18, 36, 0.55) 100%);
  }

  .lupa-login-spacer {
    display: none;
  }

  .lupa-login-panel {
    order: -1;
  }

  .lupa-login-page--art .lupa-login-panel {
    order: -1;
    justify-content: center;
    justify-self: center;
    width: 100%;
    max-width: 380px;
    min-width: 0;
    margin-right: 0;
    padding-right: 0;
    transform: none;
  }

  .lupa-login-hero {
    padding-right: 0;
    text-align: center;
  }

  .lupa-login-hero-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .lupa-login-hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .lupa-login-features {
    margin: 0 auto;
  }

  .lupa-login-stats-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .lupa-login-features {
    grid-template-columns: 1fr;
  }

  .lupa-login-stats-inner {
    grid-template-columns: 1fr;
  }

  .lupa-login-card {
    padding: 1.25rem 1.1rem;
  }
}

@media (max-height: 700px) and (min-width: 1025px) {
  .lupa-login-hero-logo {
    width: 160px;
    margin-bottom: 0.35rem;
  }

  .lupa-login-hero h1 {
    font-size: 1.25rem;
  }

  .lupa-login-feature {
    padding: 0.4rem 0.55rem;
  }

  .lupa-login-card {
    padding: 1rem 1.1rem;
  }

  .lupa-login-legal {
    padding-bottom: 0.35rem;
  }
}
