:root {
  color-scheme: light;
  --canvas: #f5f7fb;
  --surface: #fff;
  --ink: #0f172a;
  --muted: #64748b;
  --muted-strong: #526074;
  --line: #d7dfea;
  --field-line: #b4c0d0;
  --blue: #1655b8;
  --blue-hover: #124a9f;
  --blue-press: #0f3f88;
  --blue-soft: #eaf1fc;
  --danger: #b42318;
  --danger-line: #f1c8c5;
  --danger-soft: #fff5f4;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(60rem 36rem at -10% -10%, #e3ecfb 0, transparent 60%),
    radial-gradient(44rem 30rem at 110% 110%, #e8eefa 0, transparent 60%),
    var(--canvas);
  font: 400 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #75a7f4; outline-offset: 3px; }

.page {
  width: min(100%, 1180px);
  min-height: 100vh;
  margin-inline: auto;
  padding: 48px clamp(24px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 468px);
  align-items: center;
  gap: clamp(48px, 7vw, 104px);
}

/* Cartão de login */
.card {
  grid-column: 2;
  grid-row: 1;
  padding: 40px clamp(24px, 4vw, 40px) 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px #0f172a0a, 0 18px 48px -18px #0f172a24;
}
.card__logo { display: none; width: 132px; height: auto; margin: 0 0 26px; }
.card__eyebrow { margin: 0 0 10px; color: var(--muted-strong); font-size: 11px; font-weight: 650; letter-spacing: .14em; }
h1 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -.03em; line-height: 1.2; }
.card__subtitle { margin: 8px 0 28px; color: var(--muted); font-size: 15px; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
label { color: #1e293b; font-size: 13px; font-weight: 600; }
.control { position: relative; }
.control__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  fill: none;
  stroke: #8a97a9;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke .15s ease;
}
.control:focus-within .control__icon { stroke: var(--blue); }
input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder { color: #8a97a9; }
input:hover { border-color: #8b9ab0; }
input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px #1655b824; }
input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px #b4231820; }
#password { padding-right: 52px; }

.control__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.control__toggle:hover { background: var(--blue-soft); color: var(--blue); }
.control__toggle:focus-visible { outline-offset: 0; }
.control__toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.control__toggle .icon-hide, .control__toggle[aria-pressed="true"] .icon-show { display: none; }
.control__toggle[aria-pressed="true"] .icon-hide { display: block; }

.error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--danger-line);
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13.5px;
  line-height: 1.45;
}
.error svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  padding: 0 18px;
  border: 1px solid var(--blue);
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px #1655b8;
  transition: background .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.submit:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.submit:active { background: var(--blue-press); border-color: var(--blue-press); transform: translateY(1px); box-shadow: none; }
.submit[aria-busy="true"] { cursor: progress; background: var(--blue-hover); border-color: var(--blue-hover); }
.submit__spinner { display: none; width: 16px; height: 16px; border: 2px solid #ffffff55; border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.submit[aria-busy="true"] .submit__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.card__foot { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 26px 0 0; padding-top: 20px; border-top: 1px solid #e6ebf3; color: var(--muted-strong); font-size: 12px; }
.card__foot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Coluna institucional */
.intro { grid-column: 1; grid-row: 1; max-width: 560px; }
.intro__logo { display: block; width: 172px; height: auto; }
.intro__title { margin: 44px 0 0; font-size: clamp(32px, 3.6vw, 42px); font-weight: 650; letter-spacing: -.04em; line-height: 1.1; }
.intro__text { max-width: 460px; margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 36px 0 0; padding: 0; list-style: none; }
.benefit { display: grid; gap: 3px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #ffffffb8; }
.benefit strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.benefit > span:last-child { color: var(--muted-strong); font-size: 13px; line-height: 1.45; }
.benefit__icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); }
.benefit__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Telas menores: apenas o cartão */
@media (max-width: 920px) {
  .page { grid-template-columns: minmax(0, 480px); justify-content: center; padding-block: 32px; }
  .intro { display: none; }
  .card { grid-column: 1; }
  .card__logo { display: block; }
}
@media (max-width: 480px) {
  body { background: var(--canvas); }
  .page { padding: 20px 16px; align-items: start; }
  .card { padding: 28px 20px 22px; border-radius: 14px; box-shadow: 0 1px 2px #0f172a0a, 0 12px 32px -16px #0f172a24; }
  h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .submit__spinner { animation-duration: 1.6s; }
}
