/* FWMF auth screens — glass card over a soft sky scene */
:root { --fw-primary:#4f46e5; --fw-grad: linear-gradient(95deg,#4338ca 0%,#4f46e5 45%,#6366f1 100%); --fw-ink:#0f172a; --fw-muted:#64748b; }
html, body { min-height: 100%; }
body.fw-auth {
    margin: 0; font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--fw-ink);
    background:
        radial-gradient(700px 500px at 12% 8%, rgba(191, 219, 254, .9), transparent 60%),
        radial-gradient(800px 600px at 88% 20%, rgba(199, 210, 254, .9), transparent 60%),
        radial-gradient(900px 500px at 50% 110%, rgba(129, 140, 248, .55), transparent 60%),
        linear-gradient(180deg, #eef4ff 0%, #e6ecff 55%, #dfe6ff 100%);
    background-attachment: fixed; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
.fw-scene { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.fw-blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; }
.fw-blob.b1 { width: 420px; height: 420px; left: -140px; top: -120px; background: #bfdbfe; }
.fw-blob.b2 { width: 260px; height: 260px; left: -60px; bottom: 60px; background: #86efac; opacity: .35; }
.fw-blob.b3 { width: 360px; height: 360px; right: -100px; top: 30%; background: #c4b5fd; opacity: .45; }
.fw-blob.b4 { width: 220px; height: 220px; right: 8%; bottom: -60px; background: #86efac; opacity: .3; }
.fw-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34vh; }

.fw-auth main { position: relative; z-index: 1; }
.fw-auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(360px, 520px) 1fr; align-items: center; gap: 40px; padding: 48px 5vw; box-sizing: border-box; }
.fw-auth-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; box-sizing: border-box; }

.fw-tagline { position: absolute; top: 44px; right: 5vw; display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .28em; color: #475569; }
.fw-tagline:before { content: ''; width: 40px; height: 4px; border-radius: 4px; background: var(--fw-primary); }

.fw-hero h1 { font-size: clamp(30px, 3.1vw, 46px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; margin: 0 0 20px; color: var(--fw-ink); }
.fw-hero h1 em { font-style: normal; color: #4f46e5; background: linear-gradient(90deg, #4338ca, #6366f1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.fw-hero hr { width: 40px; border: 0; border-top: 2px solid #94a3b8; margin: 0 0 18px; }
.fw-hero p { color: #475569; font-size: 17px; line-height: 1.6; max-width: 360px; margin: 0 0 30px; }
.fw-feat { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.fw-feat span.ic { width: 58px; height: 58px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 58px; }
.fw-feat b { display: block; font-weight: 600; font-size: 15.5px; }
.fw-feat small { color: #64748b; font-size: 14.5px; }
.ic-blue { background: rgba(191, 219, 254, .75); color: #4f46e5; }
.ic-green { background: rgba(187, 247, 208, .8); color: #16a34a; }
.ic-red { background: rgba(254, 202, 202, .75); color: #ef4444; }

.fw-glass, .card-signin {
    background: rgba(255, 255, 255, .55) !important; -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, .85) !important; border-radius: 28px !important;
    box-shadow: 0 30px 80px rgba(79, 70, 229, .18), inset 0 1px 0 rgba(255,255,255,.9) !important;
}
.fw-login-card { padding: 44px 48px 36px; text-align: center; }
.fw-login-card .logo, .card-signin .logo { width: 150px; height: auto; max-height: 150px; object-fit: contain; border-radius: 16px; display: block; margin: 0 auto 18px; box-shadow: 0 12px 30px rgba(15,23,42,.15); }
.fw-login-card h2 { font-size: 27px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.01em; }
.fw-login-card .lead { color: #475569; font-size: 15.5px; margin: 0 auto 26px; max-width: 320px; line-height: 1.55; }
.fw-field { position: relative; margin-bottom: 16px; text-align: left; }
.fw-field input.form-control, .card-signin .form-control {
    width: 100%; height: 58px; box-sizing: border-box; border-radius: 14px; border: 1px solid rgba(226, 232, 240, .95); border-left: 4px solid #4f46e5;
    background: rgba(255,255,255,.92); padding: 0 50px 0 56px; font-size: 16px; color: var(--fw-ink); font-family: inherit;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.card-signin .form-control { padding: 0 16px; }
.fw-field input.form-control:focus, .card-signin .form-control:focus { outline: 0; border-color: #a5b4fc; border-left-color: #4f46e5; box-shadow: 0 0 0 4px rgba(99, 102, 241, .15); }
.fw-field .fi { position: absolute; left: 20px; top: 29px; transform: translateY(-50%); color: #64748b; font-size: 18px; }
.fw-eye { position: absolute; right: 12px; top: 29px; transform: translateY(-50%); background: none; border: 0; color: #64748b; padding: 8px; cursor: pointer; border-radius: 8px; }
.fw-eye:hover { color: #4f46e5; }
.fw-field .invalid-feedback { display: block; font-size: 13px; color: #dc2626; margin-top: 6px; }
.fw-remember { display: flex; align-items: center; gap: 10px; margin: 4px 0 22px; font-size: 15px; color: #1e293b; cursor: pointer; user-select: none; }
.fw-remember input { width: 22px; height: 22px; accent-color: #4f46e5; margin: 0; }
.fw-btn, .card-signin .btn-primary {
    width: 100%; height: 60px; border: 0; border-radius: 14px; background: var(--fw-grad) !important; color: #fff; font-size: 18px; font-weight: 600; font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; box-shadow: 0 16px 34px rgba(79, 70, 229, .35);
    transition: transform .15s ease, box-shadow .15s ease;
}
.card-signin .btn-primary { height: 52px; font-size: 16px; }
.fw-btn:hover { transform: translateY(-1px); box-shadow: 0 20px 40px rgba(79, 70, 229, .42); }
.fw-btn:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; }
.fw-link { display: inline-block; margin-top: 22px; color: #4f46e5; font-weight: 500; font-size: 16px; text-decoration: none; }
.fw-link:hover { text-decoration: underline; color: #4338ca; }
.fw-alert { border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; text-align: left; }
.fw-alert-danger { background: #fef2f2; color: #991b1b; }
.fw-alert-success { background: #ecfdf5; color: #065f46; }
.card-signin { padding: 24px !important; }
.card-signin h5 { font-weight: 700 !important; font-size: 20px; }
.card-signin .btn-link { color: #4f46e5; }

.fw-floats { position: relative; height: 480px; }
.fw-float { position: absolute; padding: 22px 24px; }
.fw-float.fw-progress { top: 0; right: 0; width: 360px; transform: perspective(900px) rotateY(-14deg) rotateX(6deg) rotate(-6deg); }
.fw-float.secure { top: 330px; right: 20px; width: 290px; transform: perspective(900px) rotateY(-12deg) rotate(4deg); display: flex; gap: 16px; align-items: center; }
.fw-float h4 { margin: 0; font-size: 17px; font-weight: 600; }
.fw-float small { color: #64748b; font-size: 13.5px; }
.fw-float .chip { position: absolute; top: 16px; right: 18px; width: 64px; height: 64px; border-radius: 18px; background: rgba(209, 250, 229, .85); color: #10b981; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 10px 24px rgba(16,185,129,.2); }
.fw-float svg { width: 100%; height: 150px; margin-top: 14px; }
.fw-shield { width: 52px; height: 58px; flex: 0 0 52px; }

@media (max-width: 1180px) {
    .fw-auth-wrap { grid-template-columns: 1fr minmax(340px, 480px); }
    .fw-side-right { display: none; }
}
@media (max-width: 860px) {
    .fw-auth-wrap { grid-template-columns: 1fr; padding: 90px 18px 40px; gap: 24px; }
    .fw-hero { order: 2; text-align: center; }
    .fw-hero p, .fw-hero hr { margin-left: auto; margin-right: auto; }
    .fw-feats { display: none; }
    .fw-tagline { top: 28px; right: 50%; transform: translateX(50%); font-size: 11px; letter-spacing: .2em; white-space: nowrap; }
    .fw-login-card { padding: 34px 22px 28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.fw-login-card .logo, .card-signin .logo { margin-left: auto !important; margin-right: auto !important; float: none !important; }
.fw-login-card .logo, .card-signin .logo { transform: none !important; }

/* ---------------------------------------------------------------- motion */
@keyframes fwIn { from { opacity: 0; transform: translateY(22px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fwBobA { 0%, 100% { transform: perspective(900px) rotateY(-14deg) rotateX(6deg) rotate(-6deg) translateY(0); } 50% { transform: perspective(900px) rotateY(-10deg) rotateX(4deg) rotate(-5deg) translateY(-12px); } }
@keyframes fwBobB { 0%, 100% { transform: perspective(900px) rotateY(-12deg) rotate(4deg) translateY(0); } 50% { transform: perspective(900px) rotateY(-8deg) rotate(3deg) translateY(-9px); } }
@keyframes fwShine { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes fwDrift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -20px); } }
@keyframes fwLine { from { stroke-dashoffset: 520; } to { stroke-dashoffset: 0; } }
.fw-hero { animation: fwIn .8s cubic-bezier(.2,.8,.2,1) both; }
.fw-feat { animation: fwIn .6s cubic-bezier(.2,.8,.2,1) both; }
.fw-feat:nth-child(1) { animation-delay: .35s; } .fw-feat:nth-child(2) { animation-delay: .45s; } .fw-feat:nth-child(3) { animation-delay: .55s; }
.fw-login-card { animation: fwIn .8s .15s cubic-bezier(.2,.8,.2,1) both; }
.fw-hero h1 em { background: linear-gradient(90deg, #4338ca, #6366f1, #60a5fa, #6366f1, #4338ca); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; animation: fwShine 6s linear infinite; }
.fw-float.fw-progress { animation: fwIn .8s .35s both, fwBobA 7s 1.2s ease-in-out infinite; }
.fw-float.secure { animation: fwIn .8s .5s both, fwBobB 8s 1.4s ease-in-out infinite; }
.fw-float svg path[stroke] { stroke-dasharray: 520; animation: fwLine 2.2s .8s ease-out both; }
.fw-blob.b1 { animation: fwDrift 14s ease-in-out infinite; } .fw-blob.b3 { animation: fwDrift 18s ease-in-out infinite reverse; }
.fw-btn { background-size: 200% 100% !important; transition: background-position .5s ease, transform .15s ease, box-shadow .15s ease; }
.fw-btn:hover { background-position: 100% 0 !important; }
.fw-btn.fw-loading { pointer-events: none; opacity: .85; }
.fw-btn.fw-loading i { animation: fwSpin 1s linear infinite; }
@keyframes fwSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fw-hero, .fw-feat, .fw-login-card, .fw-float, .fw-blob, .fw-hero h1 em, .fw-float svg path { animation: none !important; } }
