/* Tela de entrada: logo InfinityCondo centralizada acima dos campos de usuário e senha. */
:root {
  --brand: #0d4f8b;
  --brand-dark: #093a68;
  --brand-soft: #e8f1fa;
  --text: #1a2433;
  --muted: #64748b;
  --line: #d9e2ec;
  --danger: #c0392b;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body.login-page {
  margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; position: relative; overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text);
  background: linear-gradient(160deg, #f6f9fd 0%, #e4edf8 55%, #d5e3f3 100%);
}
.bg-shape { position: fixed; border-radius: 50%; z-index: 0; pointer-events: none; }
.bg-shape.s1 { width: 520px; height: 520px; top: -160px; right: -140px; background: radial-gradient(circle at 30% 30%, rgba(13, 79, 139, 0.18), rgba(13, 79, 139, 0)); }
.bg-shape.s2 { width: 460px; height: 460px; bottom: -180px; left: -120px; background: radial-gradient(circle at 60% 40%, rgba(13, 79, 139, 0.14), rgba(13, 79, 139, 0)); }

.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; }

.logo-crop { width: min(230px, 66vw); margin: 0 auto 6px; }
.logo-crop img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

.login-card {
  width: 100%; background: #fff; border-radius: 20px; padding: 26px 30px 26px;
  box-shadow: 0 1px 2px rgba(15, 40, 80, 0.06), 0 18px 48px rgba(15, 40, 80, 0.14); border: 1px solid rgba(13, 79, 139, 0.08);
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; text-align: center; color: var(--brand-dark); letter-spacing: -0.01em; }
.sub { margin: 0 0 22px; text-align: center; color: var(--muted); font-size: 14px; }

.field { margin-bottom: 16px; }
.field label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #334155; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 13px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; stroke: #94a3b8; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.input-wrap input {
  width: 100%; height: 48px; padding: 0 46px 0 42px; font: inherit; font-size: 16px; color: var(--text);
  background: #f8fafc; border: 1.5px solid var(--line); border-radius: 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input-wrap input::placeholder { color: #a3b1c2; }
.input-wrap input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13, 79, 139, 0.14); }
.input-wrap .toggle { position: absolute; right: 6px; top: 50%; width: 38px; height: 38px; margin-top: -19px; display: grid; place-items: center; background: none; border: 0; border-radius: 9px; cursor: pointer; }
.input-wrap .toggle svg { position: static; margin: 0; width: 20px; height: 20px; stroke: #64748b; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.input-wrap .toggle:hover { background: var(--brand-soft); }
.input-wrap .toggle[aria-pressed="true"] svg { stroke: var(--brand); }

.error { min-height: 20px; margin: 0 0 12px; color: var(--danger); font-size: 14px; font-weight: 600; text-align: center; }
.error:empty { min-height: 0; margin: 0; }

.submit {
  position: relative; width: 100%; height: 50px; font: inherit; font-size: 16px; font-weight: 700; letter-spacing: 0.01em; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #14609f 0%, var(--brand) 100%); border: 0; border-radius: 12px;
  box-shadow: 0 6px 16px rgba(13, 79, 139, 0.3); transition: transform 0.08s, box-shadow 0.15s, filter 0.15s;
}
.submit:hover { filter: brightness(1.06); box-shadow: 0 8px 20px rgba(13, 79, 139, 0.36); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 3px solid rgba(13, 79, 139, 0.35); outline-offset: 2px; }
.submit:disabled { cursor: default; filter: saturate(0.7); }
.submit .spinner { display: none; position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border: 3px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
.submit.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot { margin: 20px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }

.login-card.shake { animation: shake 0.35s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

@media (max-width: 480px) {
  .login-card { padding: 24px 20px 22px; border-radius: 18px; }
  .login-card h1 { font-size: 20px; }
}
@media (max-height: 640px) {
  .logo-crop { width: min(150px, 44vw); }
}
@media (prefers-reduced-motion: reduce) {
  .login-card.shake, .submit .spinner { animation: none; }
}
