/* Tela de entrada. Conceito: à esquerda, um painel verde-petróleo com o desenho do gráfico de quadrantes do painel;
   à direita, o formulário. No celular o painel vira uma faixa no topo. Todas as cores vêm de tokens (claro e escuro). */
:root {
  --bg: #f3f5f3; --surface: #ffffff; --ink: #1b2422; --muted: #566661; --line: #cfd8d4; --soft: #eaefec;
  --accent: #0e5e6b; --on-accent: #ffffff; --bad: #b83a26;
  --brand: #0b3b44; --brand-ink: #eaf6f7; --brand-soft: #9fd3da; --brand-warm: #e6b95a;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1514; --surface: #16201e; --ink: #e5ece9; --muted: #98a9a3; --line: #2a3a36; --soft: #1d2a27;
    --accent: #58b9c7; --on-accent: #08191c; --bad: #ee7a64; --brand: #0a2f36; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1514; --surface: #16201e; --ink: #e5ece9; --muted: #98a9a3; --line: #2a3a36; --soft: #1d2a27;
  --accent: #58b9c7; --on-accent: #08191c; --bad: #ee7a64; --brand: #0a2f36; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.login { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
p, h1, h2 { margin: 0; }

.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

/* ---------- painel da marca ---------- */
.brand { position: relative; overflow: hidden; background: var(--brand); color: var(--brand-ink);
  padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.brand .logo { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.brand .logo svg { width: 36px; height: 36px; flex: none; }
.brand .logo span { font-size: 20px; font-weight: 600; letter-spacing: .01em; }
.brand .copy { position: relative; z-index: 2; max-width: 30ch; }
.brand .eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-soft); font-weight: 600; margin-bottom: 14px; }
.brand h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; font-weight: 600; text-wrap: balance; }
.brand .note { position: relative; z-index: 2; color: var(--brand-soft); font-size: 13px; }
.brand .motif { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.brand::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 94%, transparent) 0%, color-mix(in srgb, var(--brand) 70%, transparent) 38%, transparent 72%); }
.brand .motif .g { stroke: #ffffff; stroke-opacity: .09; }
.brand .motif .ax { stroke: #ffffff; stroke-opacity: .34; }

/* ---------- formulário ---------- */
.formside { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 6vw, 64px); }
.card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 28px; }
.card h1 { font-size: 30px; line-height: 1.1; font-weight: 600; text-wrap: balance; }
.card .sub { color: var(--muted); margin-top: 8px; font-size: 15px; }
form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.control { position: relative; display: flex; }
input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 14px; height: 50px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.control input { padding-inline-end: 52px; }
.toggle { position: absolute; inset-block: 0; inset-inline-end: 0; width: 50px; display: grid; place-items: center; background: none; border: 0; border-radius: 0 10px 10px 0;
  color: var(--muted); cursor: pointer; }
.toggle:hover { color: var(--ink); }
.toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.toggle svg { width: 22px; height: 22px; }
.erro { min-height: 20px; margin-top: -8px; color: var(--bad); font-size: 14px; font-weight: 500; }
.go { height: 52px; width: 100%; font: inherit; font-size: 16px; font-weight: 600; color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: 10px; cursor: pointer; transition: filter .15s, transform .05s; }
.go:hover { filter: brightness(1.07); }
.go:active { transform: translateY(1px); }
.go:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.go:disabled { opacity: .65; cursor: default; filter: none; }
.help { color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 18px; }

/* ---------- celular e tablet ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .brand { padding: 22px 20px 26px; gap: 18px; padding-top: max(22px, env(safe-area-inset-top, 0px)); }
  .brand h2 { font-size: 22px; max-width: 24ch; }
  .brand .eyebrow { margin-bottom: 8px; }
  .brand .note { display: none; }
  .brand::after { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 92%, transparent) 0%, color-mix(in srgb, var(--brand) 55%, transparent) 55%, transparent 100%); }
  .formside { align-items: flex-start; padding: 28px 20px max(32px, env(safe-area-inset-bottom, 0px)); }
  .card { max-width: 440px; gap: 24px; }
  .card h1 { font-size: 26px; }
}
@media (max-width: 380px) {
  .brand .logo span { font-size: 18px; }
  .brand h2 { font-size: 20px; }
  .card h1 { font-size: 24px; }
}
@media (min-width: 861px) and (max-height: 640px) { .brand .motif { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
