/* APX 2027 (13/11/2026) · tela de login nova (templates/login.html + static/js/apx-login.js).
   Tema claro com o painel da marca em grafite (mockup "APX 2027 — Login e cadastro"). Sem Bootstrap. */
:root {
  --bg: #F4F6FA; --surface: #FFFFFF; --surface2: #EEF2F6; --border: #E3E8EF; --border2: #D5DCE6;
  --text: #0F172A; --text2: #334155; --muted: #526077; --brand: #1A1C21; --brand2: #2E3139;
  --accent: #2563EB; --accent-d: #1D4ED8; --blue-bg: #E8EEFF; --green: #0F7B4B; --green-bg: #E3F6EC;
  --amber-bg: #FFF3DC; --amber-fg: #8A5100; --amber-br: #F0D9A8; --red: #B42318; --red-bg: #FDECEA;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input { font: inherit; }
a { color: var(--accent-d); }
[hidden] { display: none !important; }

.lg { min-height: 100vh; display: flex; }
/* ---------- painel da marca ---------- */
.lg-brand { width: 42%; max-width: 620px; flex: none; position: relative; overflow: hidden; background: var(--brand); color: #F2F3F5;
  padding: 56px 64px; display: flex; flex-direction: column; }
.lg-hex { position: absolute; right: -170px; bottom: -150px; width: 560px; height: 620px; opacity: .09; fill: none; stroke: #F2F3F5; stroke-width: 8; }
.lg-logo { display: flex; align-items: center; gap: 14px; position: relative; }
.lg-logo img { width: 89px; height: 96px; object-fit: contain; }   /* APX 2027 (13/11/2026) · logo branco, maior, sem a palavra ao lado */
.lg-pitch { margin-top: auto; position: relative; display: flex; flex-direction: column; gap: 20px; }
.lg-pitch h1 { margin: 0; font: 800 44px/1.1 "Plus Jakarta Sans", sans-serif; letter-spacing: -.5px; }
.lg-pitch p { margin: 0; font-size: 17px; line-height: 1.6; color: #D2D5DA; max-width: 440px; }
.lg-pitch ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.lg-pitch li { display: flex; align-items: center; gap: 12px; }
.lg-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--brand2); display: flex; align-items: center; justify-content: center; flex: none; }
.lg-ic svg { width: 16px; height: 16px; fill: none; stroke: #8FB4FF; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lg-trialnote { margin: 44px 0 0; font-size: 13px; color: #A6ABB4; position: relative; }
.lg-trialnote b { color: #F2F3F5; }

/* ---------- área do formulário ---------- */
.lg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 18px; }
.lg-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.lg-card.is-wide { max-width: 480px; }
.lg-card.is-center { max-width: 520px; align-items: center; text-align: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 36px; box-shadow: 0 20px 50px rgba(15, 23, 42, .08); }
.lg-head { display: flex; flex-direction: column; gap: 6px; }
.lg-head.is-row { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.lg-head h2, .lg-card h2 { margin: 0; font: 800 30px "Plus Jakarta Sans", sans-serif; letter-spacing: -.3px; }
.lg-head p, .lg-head span { margin: 0; color: var(--muted); }
.lg-lead { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text2); }
.lg-form { display: flex; flex-direction: column; gap: 14px; }
.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-field label, .lg-codebox label { font-size: 13px; font-weight: 600; color: var(--text2); }
.lg-labelrow { display: flex; justify-content: space-between; align-items: baseline; }
.lg-field input, .lg-code { height: 48px; width: 100%; padding: 0 14px; border: 1px solid var(--border2); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 15px; }
.lg-field input:focus, .lg-code:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.lg-field input[aria-invalid="true"] { border-color: var(--red); }
.lg-pass { position: relative; }
.lg-pass input { padding-right: 48px; }
.lg-eye { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lg-eye svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.lg-eye[aria-pressed="true"] svg { stroke: var(--accent); }
.lg-eye:focus-visible, .lg-link:focus-visible, .lg-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; }
.lg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lg-hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.lg-hint.is-center { text-align: center; }
.lg-err { font-size: 12.5px; color: var(--red); min-height: 0; }
.lg-err:empty { display: none; }
.lg-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.lg-btn { height: 50px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--border2); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; text-decoration: none; position: relative; }
.lg-btn:hover { background: #F8FAFC; }
.lg-btn.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; font-size: 16px; height: 52px; }
.lg-btn.is-primary:hover { background: var(--accent-d); }
.lg-btn.is-primary[disabled] { opacity: .7; cursor: progress; }
.lg-btn.is-ghost { height: 44px; font-size: 14px; }
.lg-btn.is-reco { border: 2px solid var(--accent); font-weight: 700; }
.lg-reco { position: absolute; top: -11px; right: 14px; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.lg-g { width: 20px; height: 20px; }
.lg-social { display: flex; flex-direction: column; gap: 10px; }
.lg-or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.lg-or::before, .lg-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.lg-link { border: 0; background: none; padding: 0; color: var(--accent-d); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.lg-link:hover { text-decoration: underline; }
.lg-link.is-center { align-self: center; font-size: 14px; }
.lg-link.is-strong { font-size: 14px; font-weight: 700; }
.lg-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lg-cta { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text2); }
.lg-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--text2); cursor: pointer; }
.lg-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.lg-drive { padding: 14px; border-radius: 14px; background: var(--amber-bg); border: 1px solid var(--amber-br); }
.lg-drive label { display: flex; align-items: center; gap: 8px; color: var(--text); flex-wrap: wrap; }
.lg-drive em { font-style: normal; color: var(--amber-fg); }
.lg-drive .lg-hint { color: #5C4A1E; }
.lg-drv { width: 18px; height: 16px; }
.lg-meter { display: flex; gap: 6px; margin-top: 2px; }
.lg-meter i { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.lg-meter[data-level="1"] i:nth-child(-n+1) { background: var(--red); }
.lg-meter[data-level="2"] i:nth-child(-n+2) { background: #D97706; }
.lg-meter[data-level="3"] i:nth-child(-n+3) { background: var(--green); }
.lg-meter[data-level="4"] i { background: var(--green); }
.lg-gcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.lg-gcard img { border-radius: 50%; object-fit: cover; }
.lg-gcard div { display: flex; flex-direction: column; min-width: 0; }
.lg-gcard span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.lg-note { padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.lg-note.is-blue { background: var(--blue-bg); color: #1E3A8A; }
.lg-note.is-amber { background: var(--amber-bg); color: #5C4A1E; }
.lg-alert { width: 100%; max-width: 480px; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; background: var(--red-bg); color: var(--red); }
.lg-recover { display: flex; margin-top: 10px; height: 38px; background: #fff; border-color: #F5C2BE; color: var(--red); }   /* APX 2027 (13/11/2026) */
.lg-alert.is-ok { background: var(--green-bg); color: var(--green); }
.lg-alert.is-info { background: var(--blue-bg); color: #1E3A8A; }
.lg-bigic { width: 76px; height: 76px; border-radius: 50%; background: var(--blue-bg); display: flex; align-items: center; justify-content: center; }
.lg-bigic svg { width: 36px; height: 36px; fill: none; stroke: var(--accent-d); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; }
.lg-codebox { width: 100%; padding: 18px; border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; text-align: left; }
.lg-codebox .lg-row { flex-wrap: nowrap; }
.lg-code { font-size: 22px; font-weight: 600; letter-spacing: 8px; flex: 1; min-width: 0; }
.lg-legal { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.lg-legal a { color: var(--muted); }

/* ---------- celular ---------- */
@media (max-width: 900px) {
  .lg { flex-direction: column; }
  .lg-brand { width: auto; max-width: none; padding: 40px 20px 26px; }
  .lg-pitch { margin-top: 18px; gap: 10px; }
  .lg-pitch h1 { font-size: 26px; }
  .lg-pitch p, .lg-pitch ul, .lg-trialnote { display: none; }
  .lg-logo img { width: 56px; height: 60px; }
  .lg-hex { width: 300px; height: 330px; right: -120px; bottom: -160px; }
  .lg-main { justify-content: flex-start; padding: 24px 16px 32px; }
  .lg-card.is-center { padding: 28px 18px; }
  .lg-head h2, .lg-card h2 { font-size: 26px; }
  .lg-grid2 { grid-template-columns: 1fr; }
  .lg-field input, .lg-code { font-size: 16px; }   /* evita o zoom do iPhone */
}
@media (prefers-reduced-motion: no-preference) { .lg-card:not([hidden]) { animation: lgIn .22s ease-out; } }
@keyframes lgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
