/* ================================================================ LOGIN (Piscina em Dia) */
.login {
  position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; color: #fff; isolation: isolate;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 214, 10, .20), transparent 55%),
    radial-gradient(900px 700px at -10% 20%, rgba(0, 153, 244, .35), transparent 60%),
    linear-gradient(170deg, #000a38 0%, #001157 38%, #003a9e 70%, #0077d9 100%);
}
.login-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }

/* reflexos de luz na água */
.caustic { position: absolute; border-radius: 50%; filter: blur(40px); mix-blend-mode: screen; opacity: .55; }
.caustic.c1 { width: 520px; height: 520px; left: -120px; top: 30%; background: radial-gradient(circle, rgba(51, 181, 255, .55), transparent 65%); animation: cau1 16s ease-in-out infinite alternate; }
.caustic.c2 { width: 420px; height: 420px; right: -80px; top: 8%; background: radial-gradient(circle, rgba(255, 214, 10, .30), transparent 65%); animation: cau2 19s ease-in-out infinite alternate; }
.caustic.c3 { width: 600px; height: 380px; left: 30%; bottom: 10%; background: radial-gradient(ellipse, rgba(0, 200, 255, .35), transparent 65%); animation: cau1 22s ease-in-out infinite alternate-reverse; }
@keyframes cau1 { to { transform: translate(80px, -40px) scale(1.15); } }
@keyframes cau2 { to { transform: translate(-60px, 50px) scale(1.2); } }

/* bolhas */
.bubbles i {
  position: absolute; bottom: -30px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9), rgba(255, 255, 255, .15) 45%, rgba(255, 255, 255, .05) 70%);
  border: 1px solid rgba(255, 255, 255, .35); animation: bubble var(--d) linear infinite; animation-delay: var(--t);
}
@keyframes bubble { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 50% { transform: translate(14px, -50vh); } 100% { transform: translate(-10px, -105vh); opacity: 0; } }

/* ondas */
.lw { position: absolute; left: 0; bottom: 0; width: 200%; height: 22vh; min-height: 120px; }
.lw path { fill: #0099f4; }
.lw1 { opacity: .22; animation: lwave 18s linear infinite; }
.lw2 { opacity: .28; animation: lwave 12s linear infinite reverse; }
.lw3 { opacity: .5; animation: lwave 9s linear infinite; }
.lw3 path { fill: #33b5ff; }
@keyframes lwave { to { transform: translateX(-50%); } }

.login-grid { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; display: grid; align-items: center; justify-items: center; padding: calc(env(safe-area-inset-top) + 24px) 18px 18px; gap: 40px; }
.login-hero { display: none; }

/* cartão de vidro */
.login-card {
  position: relative; width: 100%; max-width: 410px; padding: 26px 24px 22px; border-radius: 30px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .07));
  -webkit-backdrop-filter: saturate(170%) blur(24px); backdrop-filter: saturate(170%) blur(24px);
  border: 1px solid rgba(255, 255, 255, .26); box-shadow: 0 40px 90px -30px rgba(0, 0, 30, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: card-in .7s var(--ease) both;
}
.login-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 35%, rgba(255, 214, 10, 0) 65%, rgba(255, 214, 10, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.login-card.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
.login-card.success { transition: transform .4s var(--ease), opacity .4s; transform: scale(.97); opacity: .6; }

.login-card-logo img { display: block; width: 100%; max-width: 270px; height: auto; margin: -2px auto 14px; filter: drop-shadow(0 14px 22px rgba(0, 0, 40, .45)); animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.login-emblem { display: none; }
.login-card h2 { font-size: 1.35rem; margin: 0 0 2px; color: #fff; }
.login-sub { color: rgba(255, 255, 255, .75); font-size: .92rem; margin-bottom: 18px; }

/* campos */
.lfield { display: block; margin-bottom: 14px; }
.lf-label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: rgba(255, 255, 255, .85); margin-bottom: 6px; }
.lf-input {
  display: flex; align-items: center; gap: 10px; padding: 0 6px 0 14px; height: 54px; border-radius: 16px;
  background: rgba(255, 255, 255, .95); border: 2px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.lf-input:focus-within { border-color: #33b5ff; box-shadow: 0 0 0 5px rgba(51, 181, 255, .28); }
.lf-input > svg { width: 20px; height: 20px; color: #5a6d96; flex-shrink: 0; }
.lf-input:focus-within > svg { color: #0086dd; }
.login .lf-input input { flex: 1; min-width: 0; width: auto; height: 100%; border: 0; background: transparent; padding: 0; color: #061540; font-size: 1rem; box-shadow: none; min-height: 0; border-radius: 0; }
.login .lf-input input:focus { box-shadow: none; }
.lf-input input::placeholder { color: #9aa8c4; }
.lf-eye { width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; color: #5a6d96; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.lf-eye:hover { background: rgba(0, 17, 87, .06); }
.lf-eye svg { width: 20px; height: 20px; }
.login-err { min-height: 1.2em; margin: -4px 2px 10px; font-size: .86rem; font-weight: 600; color: #ffd0d0; }
.login-err:empty { margin-bottom: 4px; }

/* botão */
.login .login-btn {
  height: 56px; border-radius: 16px; border: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: .01em;
  background: linear-gradient(135deg, #ffe14d 0%, #ffd60a 45%, #ffb800 100%); color: #2a1f00;
  box-shadow: 0 16px 30px -12px rgba(255, 184, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .6); position: relative; overflow: hidden;
}
.login-btn svg { width: 20px; height: 20px; transition: transform .25s var(--ease); }
.login-btn:hover svg { transform: translateX(4px); }
.login-btn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: shine 4s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.login-btn.loading span { opacity: .4; }
.login-btn.loading svg { animation: rot .8s linear infinite; }

/* verificação em duas etapas */
.tf-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px; background: rgba(255, 214, 10, .18); color: #ffd60a; }
.tf-ic svg { width: 28px; height: 28px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 12px; }
.login .otp input { height: 58px; text-align: center; font-size: 1.5rem; font-weight: 800; border-radius: 14px; border: 2px solid transparent; background: rgba(255, 255, 255, .95); color: #061540; padding: 0; min-height: 0; }
.login .otp input:focus { border-color: #33b5ff; box-shadow: 0 0 0 5px rgba(51, 181, 255, .28); }
.tf-links { display: flex; justify-content: space-between; margin-top: 14px; }
.linkish { background: none; border: 0; color: rgba(255, 255, 255, .85); font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 6px 2px; }
.linkish:hover { color: #fff; text-decoration: underline; }
.linkish svg { width: 16px; height: 16px; }

/* recursos (celular) */
.login-chips { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-chips li { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 14px; background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .14); font-size: .78rem; font-weight: 650; color: rgba(255, 255, 255, .92); line-height: 1.2; }
.login-chips .ai { width: 26px; height: 26px; flex-shrink: 0; --ai-ink: #d6e8ff; --ai-soft: rgba(255, 255, 255, .15); }
.login-foot { text-align: center; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); font-size: .78rem; color: rgba(255, 255, 255, .65); display: flex; align-items: center; justify-content: center; gap: 6px; position: relative; z-index: 1; }
.login-foot svg { width: 14px; height: 14px; }

/* computador: tela dividida */
@media (min-width: 900px) {
  .login-grid { grid-template-columns: 1.15fr 1fr; gap: 64px; padding: 40px 40px 20px; }
  .login-hero { display: block; animation: card-in .8s var(--ease) both; }
  .login-hero-logo { width: 380px; height: auto; display: block; margin: 0 0 22px -8px; filter: drop-shadow(0 18px 30px rgba(0, 0, 40, .5)); animation: float 6s ease-in-out infinite; }
  .login-hero h1 { font-size: 2.6rem; line-height: 1.12; letter-spacing: -0.03em; margin-bottom: 14px; color: #fff; }
  .login-hero h1 span { background: linear-gradient(90deg, #ffe14d, #ffb800); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .login-hero > p { font-size: 1.1rem; color: rgba(255, 255, 255, .8); max-width: 460px; margin-bottom: 26px; }
  .login-feats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; }
  .login-feats li { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .13); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .login-feats li:nth-child(1) { animation: card-in .7s var(--ease) .15s both; }
  .login-feats li:nth-child(2) { animation: card-in .7s var(--ease) .25s both; }
  .login-feats li:nth-child(3) { animation: card-in .7s var(--ease) .35s both; }
  .login-feats li:nth-child(4) { animation: card-in .7s var(--ease) .45s both; }
  .lf-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255, 255, 255, .92); }
  .lf-ic .ai { width: 32px; height: 32px; --ai-ink: #001157; --ai-soft: #dff1ff; }
  .login-feats b { display: block; font-size: .95rem; margin-bottom: 2px; }
  .login-feats small { display: block; color: rgba(255, 255, 255, .72); font-size: .82rem; line-height: 1.4; }
  .login-card { justify-self: end; padding: 34px 32px 28px; }
  .login-card-logo, .login-chips { display: none; }
  .login-emblem { display: block; width: 64px; height: 64px; margin-bottom: 14px; filter: drop-shadow(0 10px 16px rgba(0, 0, 40, .4)); animation: float 5s ease-in-out infinite; }
  .login-card h2 { font-size: 1.6rem; }
}
@media (max-height: 700px) and (max-width: 899px) { .login-chips { display: none; } .login-card-logo img { max-width: 220px; } }
@media (prefers-reduced-motion: reduce) { .bubbles { display: none; } .lw, .caustic, .login-btn::after { animation: none !important; } }
.bubbles i {
  mix-blend-mode: screen;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .95) 0 18%, rgba(190, 230, 255, .35) 42%, rgba(255, 255, 255, .10) 72%);
  box-shadow: inset 0 0 4px rgba(255, 255, 255, .45), 0 0 8px rgba(120, 200, 255, .25);
}
