/* api/static/v2/login.css
   Tela de login (Etapa 2) — 2 variacoes:
   - .lg--higgsfield : tela dividida (arte + formulario claro)
   - .lg--webgl      : animacao WebGL em tela cheia + cartao "glass" escuro
   Usa os tokens do dashboard.css (carregado antes). */

.lg { margin: 0; min-height: 100vh; font-family: var(--fb); color: var(--t1); overflow-x: hidden; }

/* ---- Tipografia da arte (compartilhada) ---- */
.lg-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; margin: 0 0 12px;
}
.lg-phrase {
  font-family: var(--fd); font-weight: 700; line-height: 1.02;
  font-size: clamp(30px, 4.6vw, 52px); margin: 0; letter-spacing: -0.5px;
}

/* ---- Cartao / formulario (compartilhado) ---- */
.lg-title { font-family: var(--fd); font-size: 22px; font-weight: 700; margin: 0 0 22px; }
.lg-alert {
  border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; margin-bottom: 18px;
  background: var(--red-bg-soft); border: 1px solid rgba(194,5,23,.25); color: var(--red);
}
.lg-field { margin-bottom: 16px; }
.lg-label {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 6px; color: var(--t2);
}
.lg-input {
  width: 100%; padding: 11px 14px; min-height: 44px; border-radius: var(--r-md);
  font-family: var(--fb); font-size: 14px; transition: border-color .15s, background .15s;
  background: var(--bg-elev); border: 1px solid var(--border-strong); color: var(--t1);
}
.lg-input::placeholder { color: var(--t3); }
.lg-input:focus { border-color: var(--red); }
.lg-btn {
  width: 100%; padding: 12px; margin-top: 8px; border: none; cursor: pointer;
  border-radius: var(--r-md); background: var(--red); color: #fff;
  font-family: var(--fd); font-size: 18px; font-weight: 700; letter-spacing: .5px;
  transition: background .15s;
}
.lg-btn:hover { background: var(--red-hover); }
.lg-logo { line-height: 0; margin-bottom: 20px; color: #1a1a1a; }
.lg-footer { margin-top: 20px; font-size: 11px; color: var(--t2); }

/* ========================================================= */
/* VARIACAO A — Higgsfield (tela dividida)                   */
/* ========================================================= */
.lg--higgsfield { background: var(--bg-soft); }
.lg-split { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 100vh; }

.lg-art { position: relative; overflow: hidden; background: #0d0d0d; }
.lg-art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Placeholder CSS (some quando entrar a imagem real do Higgsfield) */
.lg-art-ph {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 20% 20%, rgba(194,5,23,.35), transparent 55%),
    radial-gradient(90% 80% at 80% 90%, rgba(194,5,23,.18), transparent 60%),
    linear-gradient(135deg, #16060a 0%, #0d0d0d 55%, #05080f 100%);
}
.lg-art-ph::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(120% 100% at 30% 30%, #000 40%, transparent 80%);
          mask-image: radial-gradient(120% 100% at 30% 30%, #000 40%, transparent 80%);
}
.lg-art-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 48px; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%);
}
.lg-art-overlay .lg-kicker { color: rgba(255,255,255,.72); }
.lg-art-overlay .lg-phrase { color: #fff; max-width: 12ch; }

.lg-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.lg-panel-inner { width: 100%; max-width: 360px; }

@media (max-width: 900px) {
  .lg-split { grid-template-columns: 1fr; }
  .lg-art { min-height: 210px; }
  .lg-art-overlay { padding: 28px; }
  .lg-panel { padding: 32px 20px; }
}

/* ========================================================= */
/* VARIACAO B — WebGL (tela cheia + cartao glass)            */
/* ========================================================= */
.lg--webgl {
  color: #fff;
  background: radial-gradient(120% 120% at 50% 0%, #17070b 0%, #0d0d0d 45%, #06070c 100%);
}
.lg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.lg-stage {
  position: relative; z-index: 1; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px; gap: 26px;
}
.lg-stage .lg-kicker { color: rgba(255,255,255,.6); margin: 0; }
.lg-stage .lg-phrase { color: #fff; }
.lg-phrase--center { max-width: 16ch; }

.lg-glass {
  width: 100%; max-width: 380px; padding: 32px; text-align: left;
  border-radius: var(--r-lg);
  background: rgba(13,13,13,.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
          backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.lg--webgl .lg-logo { color: #fff; }
.lg--webgl .lg-title { color: #fff; }
.lg--webgl .lg-label { color: rgba(255,255,255,.66); }
.lg--webgl .lg-input {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff;
}
.lg--webgl .lg-input::placeholder { color: rgba(255,255,255,.5); }
.lg--webgl .lg-input:focus { border-color: var(--red); background: rgba(255,255,255,.09); }
.lg--webgl .lg-footer { color: rgba(255,255,255,.5); }
.lg--webgl .lg-alert { background: rgba(194,5,23,.85); border-color: transparent; color: #fff; }

@media (max-width: 480px) {
  .lg-glass { padding: 24px; }
  .lg-btn { padding: 14px; }   /* alvo de toque >= 44px */
}

/* ========================================================= */
/* VARIACAO C — Hibrida (cartao esq. + marca dir. + WebGL bg) */
/* ========================================================= */
.lg--hibrida {
  color: #fff;
  background: radial-gradient(120% 120% at 50% 0%, #17070b 0%, #0d0d0d 45%, #06070c 100%);
}
/* o .lg-canvas (position:fixed; inset:0) ja e definido acima e vale aqui */

.lg-hero {
  position: relative; z-index: 1; min-height: 100vh;
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; padding: 40px clamp(24px, 6vw, 88px);
}
.lg-hero__card { width: 100%; max-width: 400px; flex: 0 0 auto; }
.lg-hero__brand { max-width: 560px; margin-left: auto; text-align: right; }
.lg-hero__brand .lg-logo { display: flex; justify-content: flex-end; margin-bottom: 22px; color: #fff; }
.lg-hero__brand .lg-kicker { color: rgba(255,255,255,.62); margin: 0 0 14px; }
.lg-hero__brand .lg-phrase { color: #fff; font-size: clamp(32px, 5vw, 60px); }

/* cartao escuro (glass) — espelha a variacao WebGL */
.lg--hibrida .lg-logo { color: #fff; }
.lg--hibrida .lg-title { color: #fff; }
.lg--hibrida .lg-label { color: rgba(255,255,255,.66); }
.lg--hibrida .lg-input {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff;
}
.lg--hibrida .lg-input::placeholder { color: rgba(255,255,255,.5); }

/* Foco de teclado sobre superficie escura (cartao glass): anel BRANCO em vez do
   vermelho da marca — o vermelho sobre quase-preto fica ~3:1 (limitrofe); o
   branco garante contraste forte do indicador de foco (WCAG 2.4.11). */
.lg--webgl :focus-visible,
.lg--hibrida :focus-visible { outline-color: #fff; }
.lg--hibrida .lg-input:focus { border-color: var(--red); background: rgba(255,255,255,.09); }
.lg--hibrida .lg-footer { color: rgba(255,255,255,.5); }
.lg--hibrida .lg-alert { background: rgba(194,5,23,.85); border-color: transparent; color: #fff; }

@media (max-width: 860px) {
  .lg-hero { flex-direction: column-reverse; justify-content: center; text-align: center; gap: 30px; }
  .lg-hero__brand { text-align: center; margin: 0 auto; }
  .lg-hero__brand .lg-logo { justify-content: center; }
  .lg-hero__card { margin: 0 auto; }
}
