/* BAID X · sign-in / sign-up motion layer. Premium, quiet, and fully disabled for reduced-motion. Auth screens only. */
.progress i { background: linear-gradient(90deg, #fff, #bfe8ff 60%, #fff); box-shadow: 0 0 14px rgba(125,211,252,.6); transition: width .5s cubic-bezier(.2,.9,.3,1); position: relative; overflow: hidden; }
.progress i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.9) 50%, transparent 80%); transform: translateX(-100%); animation: sheen 2.6s ease-in-out infinite; }
@keyframes sheen { 60%, 100% { transform: translateX(100%); } }

/* every screen: its pieces rise in one after another */
.view { animation: none; }
.view[style*="flex"], .view.on, .view.show { animation: none; }
.view > * { animation: rise .55s cubic-bezier(.2,.9,.3,1) both; }
.view > *:nth-child(1) { animation-delay: .02s; } .view > *:nth-child(2) { animation-delay: .08s; } .view > *:nth-child(3) { animation-delay: .14s; }
.view > *:nth-child(4) { animation-delay: .2s; } .view > *:nth-child(5) { animation-delay: .26s; } .view > *:nth-child(n+6) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
.h1 { letter-spacing: -.02em; }

/* fields: lift + glow on focus, shake on error, tick when valid */
.field, .field-row { transition: border-color .2s, box-shadow .25s, transform .2s cubic-bezier(.2,.9,.3,1.3); }
.field:focus, .field-row:focus-within { transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(125,211,252,.14), 0 0 28px -4px rgba(125,211,252,.4), 0 16px 34px rgba(0,0,0,.45), inset 0 1.5px 0 rgba(255,255,255,.5); }
.shake { animation: shakeX .5s cubic-bezier(.36,.07,.19,.97) both; border-color: #ff8a8a !important; box-shadow: 0 0 24px -4px rgba(248,113,113,.6) !important; }
@keyframes shakeX { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
.err:not(:empty) { animation: errIn .35s ease both; } @keyframes errIn { from { opacity: 0; transform: translateY(-4px); } }
.field-row { position: relative; }
.field-row::after { content: ""; position: absolute; right: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: linear-gradient(135deg, #bff3d9, #7dd3fc) center/62% no-repeat; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304222f' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"), linear-gradient(135deg, #bff3d9, #7dd3fc); background-size: 62%, 100%; background-repeat: no-repeat; background-position: center; transform: scale(0); opacity: 0; transition: transform .35s cubic-bezier(.2,1.5,.4,1), opacity .2s; }
.field-row.valid::after { transform: scale(1); opacity: 1; }
.flag { display: inline-block; width: 22px; height: 15px; border-radius: 3px; vertical-align: -2px; margin-right: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 2px 8px rgba(0,0,0,.4); }

/* primary button: sheen when ready, spinner while working */
.btn-primary { position: relative; overflow: hidden; transition: transform .15s cubic-bezier(.2,.9,.3,1.3), box-shadow .25s, background .2s, opacity .2s; }
.btn-primary:not(:disabled)::after { content: ""; position: absolute; top: 0; bottom: 0; width: 46%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent); transform: skewX(-18deg); animation: btnSheen 3.8s ease-in-out 1s infinite; }
@keyframes btnSheen { 55%, 100% { left: 130%; } }
.btn-primary:active:not(:disabled) { transform: scale(.97); }
.btn-primary.is-loading { color: transparent !important; pointer-events: none; }
.btn-primary.is-loading::before { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2.5px solid rgba(0,0,0,.18); border-top-color: #000; animation: spin .7s linear infinite; }
.btn-primary.is-loading::after { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* password: strength meter + animated rules */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 2px 4px 6px; }
.meter i { height: 5px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; position: relative; }
.meter i::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--mc, #fff); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.9,.3,1); box-shadow: 0 0 10px var(--mc, #fff); }
.meter i.on::before { transform: scaleX(1); }
.meter-l { margin: 0 4px 10px; min-height: 16px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--mc, #9a9a9a); transition: color .3s; }
.rules li { display: inline-flex; align-items: center; gap: 6px; transition: color .25s; }
.rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); transition: all .3s cubic-bezier(.2,1.5,.4,1); flex: none; }
.rules li.ok::before { content: ""; border-color: transparent; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304222f' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/70% no-repeat, linear-gradient(135deg, #bff3d9, #34d399); animation: tick .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes tick { 0% { transform: scale(.3); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.eye { transition: transform .2s, color .2s; } .eye:active { transform: scale(.88); } .eye.on { color: #7dd3fc; }

/* categories + type cards: staggered arrival, springy selection */
.cats > * { animation: rise .5s cubic-bezier(.2,.9,.3,1) both; } .cats > *:nth-child(1) { animation-delay: .02s; } .cats > *:nth-child(2) { animation-delay: .06s; } .cats > *:nth-child(3) { animation-delay: .1s; } .cats > *:nth-child(4) { animation-delay: .14s; } .cats > *:nth-child(5) { animation-delay: .18s; } .cats > *:nth-child(n+6) { animation-delay: .22s; }
.cat { transition: transform .2s cubic-bezier(.2,1.4,.4,1), border-color .2s, background .2s, box-shadow .25s; position: relative; }
.cat:active { transform: scale(.98); }
.cat.on { transform: scale(1.015); box-shadow: 0 0 0 1px #fff, 0 14px 34px -12px rgba(125,211,252,.55); animation: catPop .35s cubic-bezier(.2,1.5,.4,1); }
@keyframes catPop { 0% { transform: scale(.96); } 100% { transform: scale(1.015); } }
.type, .acc-opt { transition: transform .2s cubic-bezier(.2,1.4,.4,1), border-color .2s, box-shadow .25s; } .type:active, .acc-opt:active { transform: scale(.985); }
.type.on { animation: catPop .35s cubic-bezier(.2,1.5,.4,1); }

@media (prefers-reduced-motion: reduce) {
  .view > *, .cats > *, .progress i::after, .btn-primary::after, .shake, .err:not(:empty), .rules li.ok::before, .cat.on, .type.on { animation: none !important; }
  .field, .field-row, .meter i::before, .cat { transition: none !important; }
}
