
        :root {
            --gold: #D4AF37; --cyan: #00f5ff; --pink: #ff6bcb;
            --bg: #050510; --card: rgba(14, 12, 32, 0.88);
            --gray: #9ca3af; --green: #2ed573; --red: #ff4757;
        }
        * { box-sizing: border-box; }
        body, html { margin: 0; min-height: 100vh; font-family: 'Poppins', sans-serif; background: var(--bg); color: #fff; }
        #ai-world-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

        .page-shell {
            position: relative; z-index: 2; width: 100%; max-width: 920px;
            margin: 0 auto; padding: 20px 18px 32px; min-height: 100vh;
        }
        .login-card {
            background: var(--card); border: 1px solid rgba(0,245,255,0.22);
            border-radius: 28px; padding: 20px 32px 24px;
            box-shadow: 0 40px 100px rgba(0,0,0,0.5);
            /* Card had no width cap of its own, so on a wide desktop window it
               stretched to page-shell's full 920px -- a login form that wide
               reads as broken, not designed. 460px matches a normal login
               form's content width; page-shell's margin:0 auto keeps it
               centered, and this only bites above 460px so phones (already
               narrower than that) are unaffected. Top/bottom padding trimmed
               from 28px to 20/24px -- with the logo also shrunk (below), the
               card no longer needs as much of its own breathing room. */
            max-width: 460px; margin: 0 auto;
        }
        .login-card.register-wide { max-width: 640px; }
        .card-accent {
            position: absolute; top: 0; left: 0; right: 0; height: 4px;
            background: linear-gradient(90deg, var(--pink), var(--cyan), var(--gold));
            border-radius: 28px 28px 0 0;
        }
        .login-card { position: relative; overflow: visible; }

        .brand-header { text-align: center; margin-bottom: 10px; }
        .brand-header i { font-size: 2.8rem; color: var(--cyan); }
        .brand-header h2 { margin: 6px 0 2px; font-size: 1.45rem; letter-spacing: 1px; }
        .brand-header p { margin: 0; color: var(--cyan); font-size: 0.82rem; letter-spacing: 2px; }
        .back-home-link {
            display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
            padding: 10px 18px; border-radius: 12px; font-size: 0.86rem; font-weight: 500;
            color: var(--cyan); text-decoration: none;
            border: 1px solid rgba(0, 245, 255, 0.35); background: rgba(0, 245, 255, 0.06);
            transition: 0.25s;
        }
        .back-home-link:hover {
            background: rgba(0, 245, 255, 0.14); color: #fff;
            box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
        }

        .flash-msg { padding: 14px; border-radius: 10px; margin-bottom: 20px; text-align: center; font-size: 0.88rem; }
        .flash-success { background: rgba(46,213,115,0.12); color: var(--green); border: 1px solid rgba(46,213,115,0.35); }
        .flash-danger { background: rgba(255,71,87,0.12); color: var(--red); border: 1px solid rgba(255,71,87,0.35); }

        /* ── Login method tabs (3 + Google) ── */
        .mode-tabs {
            display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
            margin-bottom: 14px;
        }
        .mode-tab {
            /* 14px top/bottom padding + a stacked icon-over-label layout made
               each tab ~79px tall on its own -- one of the two biggest single
               contributors to the card's overall height (measured live).
               10px padding and a smaller icon bring that down without losing
               the icon. */
            padding: 10px 6px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12);
            background: rgba(0,0,0,0.35); color: var(--gray); font-size: 0.68rem;
            font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
            cursor: pointer; text-align: center; transition: 0.25s;
            display: flex; flex-direction: column; align-items: center; gap: 4px;
            white-space: nowrap;
        }
        .mode-tab i { font-size: 1rem; }
        .mode-tab:hover { border-color: var(--cyan); color: #fff; }
        .mode-tab.active {
            border-color: var(--cyan); color: var(--cyan);
            background: rgba(0,245,255,0.1); box-shadow: 0 0 20px rgba(0,245,255,0.15);
        }

        .dual-bar {
            display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
            gap: 12px; padding: 14px 16px; margin-bottom: 20px;
            background: rgba(212,175,55,0.08); border: 1px solid rgba(212,175,55,0.25);
            border-radius: 14px;
        }
        .dual-bar label { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; cursor: pointer; }
        .dual-pickers { display: none; gap: 10px; flex-wrap: wrap; }
        .dual-pickers.show { display: flex; }
        .dual-pickers select {
            padding: 8px 12px; border-radius: 8px; background: #111; color: #fff;
            border: 1px solid rgba(255,255,255,0.15); font-size: 0.82rem;
        }

        .auth-panel { display: none; padding: 8px 0 4px; animation: fadeIn 0.35s ease; }
        .auth-panel.active { display: block; }
        .login-card.dual-on .auth-panel.dual-visible { display: block; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px dashed rgba(255,255,255,0.08); }
        .login-card.dual-on .auth-panel.dual-visible:last-of-type { border-bottom: none; }
        .panel-title { font-size: 0.8rem; color: var(--cyan); margin: 0 0 14px; letter-spacing: 1px; text-transform: uppercase; }

        .input-group { position: relative; margin-bottom: 16px; }
        .input-group i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--gray); z-index: 1; }
        .input-group input, .input-group select {
            width: 100%; padding: 15px 15px 15px 50px;
            background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px; color: #fff; font-size: 0.95rem; font-family: inherit; outline: none;
        }
        .input-group select { appearance: auto; cursor: pointer; }
        .input-group input:focus, .input-group select:focus { border-color: var(--cyan); }

        .loc-block { margin-bottom: 18px; }
        .loc-block label { display: block; font-size: 0.75rem; color: var(--gray); margin-bottom: 6px; letter-spacing: 0.5px; }
        .loc-block .input-group { margin-bottom: 12px; }
        .loc-block select { padding-left: 16px; }

        .btn-main {
            width: 100%; padding: 15px; border: none; border-radius: 12px;
            font-size: 0.95rem; font-weight: 600; cursor: pointer; letter-spacing: 1px;
            display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 8px;
            background: linear-gradient(45deg, var(--cyan), #007799); color: #001018; transition: 0.3s;
        }
        .btn-main:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,245,255,0.3); }
        .btn-gold { background: linear-gradient(45deg, var(--gold), #b8952d); color: #111; }
        .btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.25); color: #ddd; }
        .btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

        /* Face Scan CSS (ring, modal, trigger) removed from registration 2026-09
           -- feature moved to Account Settings. */

        .otp-row { display: flex; gap: 10px; align-items: stretch; }
        .otp-row .input-group { flex: 1; margin-bottom: 0; }
        .otp-row .btn-main {
            width: auto; min-width: 96px; margin-top: 0; padding: 0 14px;
            font-size: 0.78rem; letter-spacing: 0.3px; white-space: nowrap; border-radius: 10px;
        }

        /* Autofill par bhi input dark hi rahe (white box na dikhe) */
        input:-webkit-autofill,
        input:-webkit-autofill:hover,
        input:-webkit-autofill:focus,
        select:-webkit-autofill,
        textarea:-webkit-autofill {
            -webkit-text-fill-color: #fff !important;
            -webkit-box-shadow: 0 0 0 1000px rgba(10,12,20,0.96) inset !important;
            box-shadow: 0 0 0 1000px rgba(10,12,20,0.96) inset !important;
            caret-color: #fff !important;
            transition: background-color 99999s ease-out 0s;
        }

        /* Premium password show/hide eye toggle — inside input box */
        .pw-wrap { position: relative; margin-bottom: 14px; }
        .pw-wrap input {
            width: 100%; padding: 15px 52px 15px 50px;
            background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px; color: #fff; font-size: 0.95rem; font-family: inherit; outline: none;
        }
        .pw-wrap input:focus { border-color: var(--cyan); }
        .pw-wrap .pw-icon-left {
            position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
            color: var(--gray); z-index: 1; pointer-events: none;
        }
        .pw-wrap .pw-toggle {
            position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
            display: flex; align-items: center; justify-content: center;
            width: 32px; height: 32px; border-radius: 50%;
            background: rgba(0,245,255,0.08); border: 1px solid rgba(0,245,255,0.22);
            color: var(--cyan); cursor: pointer; font-size: 0.88rem; z-index: 3; padding: 0;
            transition: all 0.2s ease;
        }
        .pw-wrap .pw-toggle:hover { background: rgba(0,245,255,0.2); border-color: var(--cyan); transform: translateY(-50%) scale(1.1); box-shadow: 0 0 10px rgba(0,245,255,0.35); }
        .pw-wrap .pw-toggle:active { transform: translateY(-50%) scale(0.93); }
        /* Purane .input-group .pw-toggle bhi andar rahe */
        .input-group .pw-toggle {
            position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
            display: flex; align-items: center; justify-content: center;
            width: 32px; height: 32px; border-radius: 50%;
            background: rgba(0,245,255,0.08); border: 1px solid rgba(0,245,255,0.22);
            color: var(--cyan); cursor: pointer; font-size: 0.88rem; z-index: 3; padding: 0;
            transition: all 0.2s ease;
        }
        .input-group .pw-toggle:hover { background: rgba(0,245,255,0.2); border-color: var(--cyan); transform: translateY(-50%) scale(1.1); box-shadow: 0 0 10px rgba(0,245,255,0.35); }
        .input-group .pw-toggle:active { transform: translateY(-50%) scale(0.93); }
        .input-group input.has-toggle { padding-right: 52px; }
        /* Browser native eye hata do */
        input[type="password"]::-ms-reveal,
        input[type="password"]::-ms-clear { display: none; }

        /* OTP box ko Get OTP ke baad clearly highlight karo */
        .otp-hint {
            font-size: 0.8rem; color: var(--cyan); margin: 2px 0 8px;
            display: flex; align-items: center; gap: 6px; font-weight: 600;
        }
        .field-hint {
            display: block; margin: -8px 0 12px 4px;
            color: rgba(255,255,255,0.52); font-size: 0.68rem; line-height: 1.35;
        }
        .google-protect-note {
            grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 12px;
            padding: 13px 15px; margin-bottom: 12px; border-radius: 14px;
            background: rgba(0,245,255,0.07); border: 1px solid rgba(0,245,255,0.22);
            color: rgba(255,255,255,0.82); font-size: 0.78rem; line-height: 1.45;
        }
        .google-protect-note i { color: var(--cyan); font-size: 1.1rem; margin-top: 2px; }
        .google-protect-note b { color: #fff; display: block; margin-bottom: 2px; }
        .otp-highlight {
            border-color: var(--cyan) !important;
            box-shadow: 0 0 0 3px rgba(0,245,255,0.28) !important;
            animation: otpPulse 0.9s ease 2;
        }
        @keyframes otpPulse {
            0%, 100% { box-shadow: 0 0 0 3px rgba(0,245,255,0.28); }
            50% { box-shadow: 0 0 0 7px rgba(0,245,255,0.10); }
        }

        .links { display: flex; justify-content: space-between; margin-top: 24px; font-size: 0.86rem; flex-wrap: wrap; gap: 10px; }
        .links a { color: var(--gray); cursor: pointer; text-decoration: none; }
        .links a:hover { color: var(--cyan); }

        .form-section { display: none; }
        .form-section.active { display: block; }

        .login-card-footer { text-align: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(0,245,255,0.12); font-size: 0.78rem; color: rgba(255,255,255,0.4); }
        .login-card-footer b { color: var(--gold); }

        .unlock-box, .totp-setup-box {
            padding: 16px; border-radius: 12px; margin-bottom: 20px;
            background: rgba(255,71,87,0.08); border: 1px solid rgba(255,71,87,0.25);
        }
        .totp-setup-box { background: rgba(0,245,255,0.06); border-color: rgba(0,245,255,0.25); }
        .hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

        @keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

        /* ── Register: single-page 2-column grid (kam scroll) ── */
        .reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
        .reg-grid .input-group { margin-bottom: 14px; }
        .reg-grid .reg-full { grid-column: 1 / -1; }
        .reg-grid .loc-block { margin-bottom: 6px; }
        .reg-otp-field { display: none; }        /* OTP field tabhi dikhe jab "Get OTP" daba ho */
        .reg-otp-field.show { display: block; }
        @media (max-width: 760px) {
            .reg-grid { grid-template-columns: minmax(0, 1fr); }
        }

        @media (max-width: 640px) {
            .page-shell { padding: 16px 12px 32px; }
            .login-card { padding: 28px 20px; }
            .mode-tabs { grid-template-columns: repeat(2, 1fr); }
        }

        /* ══ MOBILE APP ENHANCEMENTS (Sirf phone par, Desktop pe koi effect nahi) ══ */
        @media (max-width: 480px) {
            /* App jaisa behavior — no text select, no tap highlight */
            body {
                -webkit-user-select: none; user-select: none;
                -webkit-tap-highlight-color: transparent;
                overscroll-behavior: none;
                padding-top: env(safe-area-inset-top);
                padding-bottom: env(safe-area-inset-bottom);
            }
            /* Input fields mein typing allow karo */
            input, textarea, select { -webkit-user-select: text; user-select: text; }

            /* Page shell — full mobile */
            .page-shell {
                padding: 12px 10px 24px;
                min-height: 100dvh;
            }

            /* Login card — zyada rounded, bigger shadow */
            .login-card {
                padding: 24px 16px;
                border-radius: 22px;
                border-color: rgba(0,245,255,0.15);
                box-shadow: 0 20px 60px rgba(0,0,0,0.6);
            }

            /* Brand header — compact */
            .brand-header { margin-bottom: 10px; }
            .brand-header i { font-size: 2.2rem; }
            .brand-header h2 { font-size: 1.05rem; margin: 4px 0 1px; }
            .brand-header p { font-size: 0.65rem; letter-spacing: 1px; }
            .panel-title { margin: 0 0 8px; font-size: 0.72rem; }

            /* Back home button — hide in app mode.
               display-mode:standalone only matches an INSTALLED PWA. The
               Capacitor WebView reports display-mode "browser", so the app
               never matched it -- body.wedai-native-app is the gate that
               actually fires there (and in a phone browser), same as the
               dashboard uses. */
            @media (display-mode: standalone) {
                .back-home-link { display: none; }
            }
            body.wedai-native-app .back-home-link { display: none; }

            /* Mode tabs — compact, always 3-in-a-row so no wrap row eats height */
            .mode-tabs, #modeTabs { grid-template-columns: repeat(3, 1fr) !important; gap: 6px; margin-bottom: 12px; }
            .mode-tab {
                padding: 8px 4px;
                border-radius: 10px;
                font-size: 0.6rem;
                min-height: 44px;
                gap: 3px;
            }
            .mode-tab i { font-size: 0.95rem; }

            /* Input fields — compact for one-screen fit */
            .input-group { margin-bottom: 10px; }
            .input-group input, .input-group select {
                padding: 11px 11px 11px 42px;
                font-size: 0.88rem;
                border-radius: 10px;
            }
            .input-group i { left: 14px; font-size: 0.85rem; }
            .pw-wrap input {
                padding: 11px 44px 11px 42px;
                font-size: 0.88rem;
                border-radius: 10px;
            }

            /* Login button — compact */
            .btn-main {
                padding: 11px;
                border-radius: 10px;
                font-size: 0.88rem;
                margin-top: 4px;
            }

            /* Google button — compact */
            #googleSignInBtn { padding: 10px; margin-bottom: 4px; font-size: 0.85rem; }

            /* Divider — compact */
            #login-section > div[style*="margin-bottom:14px;margin-top:6px"] { margin: 4px 0 10px !important; }

            /* Links row — compact */
            .links { margin-top: 12px; font-size: 0.78rem; }

            /* Footer — compact */
            .login-card-footer { margin-top: 14px; padding-top: 10px; font-size: 0.72rem; }

            /* Back-home pill — compact */
            .back-home-link { padding: 7px 14px; margin-bottom: 10px; font-size: 0.78rem; }

            /* Smooth transitions */
            .auth-panel { transition: opacity 0.3s ease; }

            /* Hide 3D canvas on low-end phones for performance */
            #ai-world-canvas { opacity: 0.4; }
        }

        /* App mode — extra app tweaks.
           Two gates for the same rules: display-mode:standalone catches an
           installed PWA, body.wedai-native-app catches the Capacitor app and
           a phone browser (server-side UA detection). Without the second one
           these never applied inside the actual APK. */
        @media (display-mode: standalone) {
            .back-home-link { display: none !important; }
            body { padding-top: env(safe-area-inset-top); }
        }
        body.wedai-native-app .back-home-link { display: none !important; }
        body.wedai-native-app { padding-top: env(safe-area-inset-top); }

        /* ── NEW 3D Logo Animation ── */
        .brand-logo-3d {
            /* 260px was sized for the OLD 920px-wide card. Now that the card
               itself caps at 460px (see .login-card above), a 260px logo ate
               well over half the card's width and pushed everything below it
               down the page -- that's what was stretching the card tall, not
               the width fix. 190px keeps the same rough proportion the logo
               had in the old wide card. */
            width: 190px; height: auto; object-fit: contain;
            filter: drop-shadow(0 0 18px rgba(0,180,255,0.5)) drop-shadow(0 0 40px rgba(147,51,234,0.35));
            animation: logoFloat3D 4s ease-in-out infinite, logoGlowPulse 3s ease-in-out infinite;
            transition: transform 0.4s, filter 0.4s;
        }
        .brand-logo-3d:hover {
            transform: scale(1.12) translateY(-4px);
            filter: drop-shadow(0 0 28px rgba(0,245,255,0.7)) drop-shadow(0 0 50px rgba(168,85,247,0.5));
        }
        @keyframes logoFloat3D {
            0%, 100% { transform: translateY(0) scale(1); }
            50% { transform: translateY(-8px) scale(1.04); }
        }
        @keyframes logoGlowPulse {
            0%, 100% { filter: drop-shadow(0 0 18px rgba(0,180,255,0.5)) drop-shadow(0 0 40px rgba(147,51,234,0.35)); }
            50% { filter: drop-shadow(0 0 30px rgba(0,245,255,0.7)) drop-shadow(0 0 55px rgba(168,85,247,0.5)); }
        }
        @media (max-width: 480px) {
            .brand-logo-3d { width: 150px; }
            .page-shell { padding: 8px 8px 14px; }
            .login-card { padding: 16px 14px; }
            .brand-header { margin-bottom: 8px; }
            .brand-header h2 { font-size: 1.05rem; }
            .brand-header p { font-size: 0.65rem; }
        }

        /* ── OTP Flow Animations ── */
        .otp-get-btn {
            width: auto; min-width: 110px; margin-top: 0; padding: 0 18px;
            font-size: 0.82rem; letter-spacing: 0.3px; white-space: nowrap; border-radius: 12px;
            transition: all 0.35s cubic-bezier(0.25,1,0.5,1);
        }
        .otp-get-btn.sending {
            background: linear-gradient(45deg, rgba(0,245,255,0.3), rgba(0,180,220,0.4));
            border: 1px solid var(--cyan); color: var(--cyan);
            pointer-events: none;
        }
        .otp-get-btn.counting {
            background: rgba(0,0,0,0.5); border: 1px solid rgba(0,245,255,0.3);
            color: var(--cyan); pointer-events: none; font-family: 'Poppins', monospace;
        }
        .otp-countdown-bar {
            display: none; align-items: center; gap: 10px;
            margin-top: 10px; padding: 6px 10px;
            background: rgba(0,245,255,0.05); border: 1px solid rgba(0,245,255,0.15);
            border-radius: 10px; overflow: hidden;
        }
        .otp-countdown-track {
            flex: 1; height: 4px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden;
        }
        .otp-countdown-fill {
            height: 100%; background: linear-gradient(90deg, var(--cyan), #007799);
            border-radius: 4px; transition: width 1s linear;
            box-shadow: 0 0 8px rgba(0,245,255,0.4);
        }
        .otp-countdown-text {
            font-size: 0.72rem; color: var(--cyan); font-weight: 600;
            min-width: 32px; text-align: right; font-family: 'Poppins', monospace;
        }
        .otp-entry-block {
            display: none; animation: otpSlideIn 0.4s ease;
        }
        .otp-entry-block.show { display: block; }
        @keyframes otpSlideIn {
            0% { opacity: 0; transform: translateY(12px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        .otp-verify-row {
            display: flex; gap: 10px; align-items: stretch; margin-bottom: 12px;
        }
        .otp-verify-row .input-group { flex: 1; margin-bottom: 0; }
        .otp-verify-btn {
            width: auto; min-width: 90px; margin-top: 0; padding: 0 16px;
            font-size: 0.82rem; white-space: nowrap; border-radius: 10px;
            transition: all 0.3s;
        }
        .otp-verify-btn.verified {
            background: linear-gradient(45deg, #2ecc71, #1e9e5a) !important;
            color: #fff !important; pointer-events: none;
        }
        .btn-otp-login-green {
            background: linear-gradient(45deg, #2ecc71, #27ae60, #2ecc71) !important;
            background-size: 200% !important; color: #fff !important;
            animation: greenPulse 2s ease-in-out infinite, greenShimmer 3s linear infinite;
            box-shadow: 0 8px 25px rgba(46,204,113,0.4) !important;
            border: none;
        }
        .btn-otp-login-green:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 12px 35px rgba(46,204,113,0.55) !important;
        }
        @keyframes greenPulse {
            0%, 100% { box-shadow: 0 8px 25px rgba(46,204,113,0.4); }
            50% { box-shadow: 0 8px 35px rgba(46,204,113,0.65), 0 0 15px rgba(46,204,113,0.3); }
        }
        @keyframes greenShimmer {
            0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; }
        }
        .otp-panel-title-verified {
            color: #2ecc71 !important; animation: titleVerifiedPop 0.5s ease;
        }
        @keyframes titleVerifiedPop {
            0% { transform: scale(0.9); opacity: 0.5; }
            50% { transform: scale(1.08); }
            100% { transform: scale(1); opacity: 1; }
        }

        /* ── Profile Photo Uploader (Facebook-style) ── */
        .profile-upload-zone {
            display: flex; align-items: center; gap: 18px;
            padding: 16px; border: 2px dashed rgba(0,245,255,0.25);
            border-radius: 16px; background: rgba(0,245,255,0.03);
            cursor: pointer; transition: all 0.3s;
        }
        .profile-upload-zone:hover {
            border-color: var(--cyan); background: rgba(0,245,255,0.07);
        }
        .profile-upload-zone.dragover {
            border-color: var(--cyan); background: rgba(0,245,255,0.12);
            transform: scale(1.01);
        }
        .profile-avatar-preview {
            width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
            background: rgba(255,255,255,0.06); border: 2px solid rgba(0,245,255,0.3);
            display: flex; align-items: center; justify-content: center;
            overflow: hidden; position: relative; transition: all 0.3s;
        }
        .profile-avatar-preview i {
            font-size: 1.5rem; color: rgba(0,245,255,0.5); transition: 0.3s;
        }
        .profile-avatar-preview img {
            width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
        }
        .profile-avatar-preview.has-img { border-color: #2ecc71; }
        .profile-upload-info { flex: 1; }
        .profile-upload-info .pu-title {
            font-size: 0.88rem; font-weight: 600; color: #fff; margin: 0 0 3px;
        }
        .profile-upload-info .pu-sub {
            font-size: 0.72rem; color: var(--gray); margin: 0;
        }
        .profile-upload-info .pu-filename {
            font-size: 0.72rem; color: #2ecc71; margin: 4px 0 0; display: none;
        }
        .profile-upload-btn {
            padding: 8px 16px; border-radius: 10px; font-size: 0.78rem; font-weight: 600;
            background: rgba(0,245,255,0.12); color: var(--cyan); border: 1px solid rgba(0,245,255,0.3);
            cursor: pointer; white-space: nowrap; transition: 0.3s;
        }
        .profile-upload-btn:hover { background: rgba(0,245,255,0.22); }
        @media (max-width: 480px) {
            .profile-upload-zone { padding: 12px; gap: 12px; }
            .profile-avatar-preview { width: 52px; height: 52px; }
        }

        /* ===== Signup: premium motion (owner, 2026-10-01) -- additive only, desktop DOM untouched ===== */
        #register-section.active .reg-grid > * { animation: wdRise .5s cubic-bezier(.22,.8,.3,1) both; }
        #register-section.active .reg-grid > :nth-child(2) { animation-delay: .05s; }
        #register-section.active .reg-grid > :nth-child(3) { animation-delay: .1s; }
        #register-section.active .reg-grid > :nth-child(4) { animation-delay: .15s; }
        #register-section.active .reg-grid > :nth-child(n+5) { animation-delay: .2s; }
        @keyframes wdRise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

        #register-form .input-group input { transition: border-color .25s, box-shadow .25s, transform .25s, background .25s; }
        #register-form .input-group input:hover { border-color: rgba(255,255,255,0.22); }
        #register-form .input-group input:focus {
            border-color: var(--gold); transform: translateY(-1px); background: rgba(0,0,0,0.62);
            box-shadow: 0 0 0 3px rgba(212,175,55,0.16), 0 10px 30px -12px rgba(212,175,55,0.45);
        }
        #register-form .input-group i { transition: color .25s, transform .25s, text-shadow .25s; }
        #register-form .input-group input:focus ~ i, #register-form .input-group input:not(:placeholder-shown) ~ i {
            color: var(--gold); transform: translateY(-50%) scale(1.12); text-shadow: 0 0 12px rgba(212,175,55,0.6);
        }
        #register-form .input-group input:not(:placeholder-shown):valid:not(:focus) { border-color: rgba(46,204,113,0.45); }

        /* Mobile / Email picker: one gold pill that slides to the chosen side */
        .wd-pick-row { position: relative; display: flex; gap: 0; padding: 4px; margin-bottom: 12px; border-radius: 14px;
            background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.1); isolation: isolate; }
        .wd-pick-row::before { content: ''; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 11px;
            background: linear-gradient(45deg, var(--gold), #b8952d); box-shadow: 0 6px 20px -6px rgba(212,175,55,0.7);
            transition: transform .4s cubic-bezier(.22,.8,.3,1); z-index: 0; }
        .wd-pick-row.wd-pick-email::before { transform: translateX(100%); }
        .wd-pick { flex: 1; position: relative; z-index: 1; border: 0; background: transparent; color: var(--gray); padding: 11px 8px;
            border-radius: 11px; font-size: .86rem; font-weight: 600; font-family: inherit; letter-spacing: .4px; cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 8px; transition: color .3s, transform .2s; }
        .wd-pick:hover { color: #fff; }
        .wd-pick:active { transform: scale(.97); }
        .wd-pick.wd-pick-on { color: #111; }
        .wd-pick i { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
        .wd-pick.wd-pick-on i { transform: translateY(-1px) scale(1.15); }
        .wd-swap-in > * { animation: wdSwap .4s cubic-bezier(.22,.8,.3,1) both; }
        @keyframes wdSwap { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

        /* OTP box arrives with a slide + gold pulse; the Verify pill breathes until pressed */
        #register-form .reg-otp-field.show { animation: wdOtpIn .55s cubic-bezier(.22,.8,.3,1) both; }
        @keyframes wdOtpIn { 0% { opacity: 0; transform: translateY(-10px) scaleY(.92); transform-origin: top; }
            60% { box-shadow: 0 0 0 4px rgba(212,175,55,0.22); } 100% { opacity: 1; transform: none; box-shadow: none; } }
        #register-form .reg-otp-field.show input { letter-spacing: 6px; font-weight: 700; }
        #register-form .reg-otp-field.show input::placeholder { letter-spacing: normal; font-weight: 400; }
        #register-form .reg-otp-field.show:not(.wd-otp-ok) .btn-main { animation: wdBreathe 1.8s ease-in-out infinite; }
        @keyframes wdBreathe { 0%,100% { box-shadow: 0 0 0 0 rgba(0,245,255,0); } 50% { box-shadow: 0 0 0 5px rgba(0,245,255,0.18); } }
        #register-form .reg-otp-field.wd-otp-ok { animation: wdOk .5s cubic-bezier(.34,1.56,.64,1); }
        #register-form .reg-otp-field.wd-otp-ok .btn-main { animation: none; }
        #register-form .reg-otp-field.wd-otp-ok i.fa-key { color: #2ecc71; text-shadow: 0 0 12px rgba(46,204,113,0.7); }
        @keyframes wdOk { 0% { transform: scale(1); } 40% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(46,204,113,0.18); } 100% { transform: none; box-shadow: none; } }

        /* Gold CTA: slow sheen */
        #register-form .btn-gold { position: relative; overflow: hidden; }
        #register-form .btn-gold::after { content: ''; position: absolute; top: -40%; bottom: -40%; width: 38%; left: -50%;
            background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent); transform: skewX(-20deg);
            animation: wdSheen 3.2s ease-in-out infinite; pointer-events: none; }
        @keyframes wdSheen { 0%, 55% { left: -50%; } 100% { left: 130%; } }
        #register-form .btn-gold:hover { box-shadow: 0 12px 32px -8px rgba(212,175,55,0.65); }
        #register-form .otp-row .btn-main:hover { transform: translateY(-1px); }

        @media (prefers-reduced-motion: reduce) {
            #register-section.active .reg-grid > *, .wd-swap-in > *, #register-form .reg-otp-field.show,
            #register-form .reg-otp-field.wd-otp-ok, #register-form .btn-gold::after,
            #register-form .reg-otp-field.show:not(.wd-otp-ok) .btn-main { animation: none; }
            .wd-pick-row::before { transition: none; }
        }
        /* ===== Login page: premium motion (owner, 2026-10-01) -- additive only =====
           Everything here animates transform / opacity / box-shadow only (cheap on phones),
           is scoped to #mainCard, and switches off under prefers-reduced-motion. */
        @property --wd-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

        /* 1. The card arrives: rise + un-blur, then breathes a rotating gold/cyan rim */
        #mainCard { animation: wdCardIn .8s cubic-bezier(.16,.84,.3,1) backwards; transition: max-width .45s cubic-bezier(.22,.8,.3,1); }
        @keyframes wdCardIn { from { opacity: 0; transform: translateY(26px) scale(.965); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
        #mainCard::before {
            content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
            background: conic-gradient(from var(--wd-ang), rgba(0,245,255,0) 0deg, rgba(0,245,255,.75) 60deg,
                        rgba(212,175,55,.9) 120deg, rgba(255,107,203,.6) 180deg, rgba(0,245,255,0) 240deg, rgba(0,245,255,0) 360deg);
            -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            -webkit-mask-composite: xor; mask-composite: exclude;
            opacity: .55; animation: wdRim 7s linear infinite;
        }
        @keyframes wdRim { to { --wd-ang: 360deg; } }
        /* desktop: a soft light follows the pointer across the card */
        #mainCard::after {
            content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
            background: radial-gradient(420px circle at var(--wd-mx, 50%) var(--wd-my, 0%), rgba(0,245,255,.07), transparent 60%);
            transition: opacity .4s;
        }
        @media (hover: hover) and (pointer: fine) { #mainCard:hover::after { opacity: 1; } }

        /* 2. Top accent line flows; title gets a slow gold sheen; tagline settles in */
        #mainCard .card-accent { background-size: 300% 100%; animation: wdAccent 6s linear infinite; }
        @keyframes wdAccent { to { background-position: 300% 0; } }
        #mainCard .brand-header h2 {
            background: linear-gradient(100deg, #fff 0%, #fff 42%, #f5d77a 50%, #fff 58%, #fff 100%);
            background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
            animation: wdTitleSheen 6.5s ease-in-out 1s infinite, wdRise .6s .15s cubic-bezier(.22,.8,.3,1) both;
        }
        @keyframes wdTitleSheen { 0%, 60% { background-position: 100% 0; } 100% { background-position: -150% 0; } }
        #mainCard .brand-header p { animation: wdTagline .9s .3s cubic-bezier(.22,.8,.3,1) both; }
        @keyframes wdTagline { from { opacity: 0; letter-spacing: 7px; } to { opacity: 1; letter-spacing: 2px; } }
        #mainCard .back-home-link { animation: wdRise .5s .05s both; }

        /* 3. Sections and their contents rise in, one after another */
        #mainCard .form-section.active { animation: wdSectionIn .45s cubic-bezier(.22,.8,.3,1) both; }
        @keyframes wdSectionIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
        #login-section.active > * { animation: wdRise .5s cubic-bezier(.22,.8,.3,1) both; }
        #login-section.active > :nth-child(2) { animation-delay: .06s; }
        #login-section.active > :nth-child(3) { animation-delay: .12s; }
        #login-section.active > :nth-child(4) { animation-delay: .18s; }
        #login-section.active > :nth-child(n+5) { animation-delay: .24s; }
        #forgot-section.active > * { animation: wdRise .45s cubic-bezier(.22,.8,.3,1) both; }
        #forgot-section.active > :nth-child(n+2) { animation-delay: .07s; }
        #forgot-section.active > :nth-child(n+4) { animation-delay: .14s; }
        #mainCard .auth-panel.active { animation: wdPanelIn .4s cubic-bezier(.22,.8,.3,1) both; }
        @keyframes wdPanelIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
        #mainCard .auth-panel.active .panel-title { animation: wdTitleIn .45s .05s both; }
        @keyframes wdTitleIn { from { opacity: 0; letter-spacing: 4px; } to { opacity: 1; letter-spacing: 1px; } }

        /* 4. Login method tabs: lift on hover, pop + glow ring when chosen */
        #mainCard .mode-tab { position: relative; overflow: hidden; transition: color .25s, border-color .25s, background .25s, transform .25s, box-shadow .3s; }
        #mainCard .mode-tab:hover { transform: translateY(-2px); }
        #mainCard .mode-tab:active { transform: scale(.96); }
        #mainCard .mode-tab.active { animation: wdTabPop .45s cubic-bezier(.34,1.56,.64,1); }
        #mainCard .mode-tab.active i { animation: wdIconHop .55s cubic-bezier(.34,1.56,.64,1); }
        @keyframes wdTabPop { 0% { transform: scale(.94); box-shadow: 0 0 0 0 rgba(0,245,255,.45); } 60% { transform: scale(1.04); }
            100% { transform: none; box-shadow: 0 0 0 7px rgba(0,245,255,0), 0 0 20px rgba(0,245,255,.15); } }
        @keyframes wdIconHop { 0% { transform: translateY(0); } 40% { transform: translateY(-4px) scale(1.18); } 100% { transform: none; } }

        /* 5. Every input: gold focus ring, lifted, icon lights up; filled inputs keep a lit icon */
        #mainCard .input-group input { transition: border-color .25s, box-shadow .25s, transform .25s, background .25s; }
        #mainCard .input-group input:hover { border-color: rgba(255,255,255,0.22); }
        #mainCard .input-group input:focus {
            border-color: var(--gold); transform: translateY(-1px); background: rgba(0,0,0,0.62);
            box-shadow: 0 0 0 3px rgba(212,175,55,0.16), 0 10px 30px -12px rgba(212,175,55,0.45);
        }
        #mainCard .input-group i { transition: color .25s, transform .25s, text-shadow .25s; }
        #mainCard .input-group input:focus ~ i, #mainCard .input-group input:not(:placeholder-shown) ~ i {
            color: var(--gold); transform: translateY(-50%) scale(1.12); text-shadow: 0 0 12px rgba(212,175,55,0.6);
        }
        #mainCard .pw-wrap input { transition: border-color .25s, box-shadow .25s; }
        #mainCard .pw-wrap input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.16); }

        /* 6. Buttons: press feel, ripple from the finger, slow sheen on every gold button */
        #mainCard .btn-main { position: relative; overflow: hidden; }
        #mainCard .btn-main:active { transform: scale(.97); }
        #mainCard .btn-gold::after { content: ''; position: absolute; top: -40%; bottom: -40%; width: 38%; left: -50%;
            background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent); transform: skewX(-20deg);
            animation: wdSheen 3.2s ease-in-out infinite; pointer-events: none; }
        #mainCard .btn-gold:hover { box-shadow: 0 12px 32px -8px rgba(212,175,55,0.65); }
        .wd-ripple { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); opacity: .45;
            background: radial-gradient(circle, rgba(255,255,255,.75), rgba(255,255,255,0) 70%); animation: wdRipple .6s ease-out forwards; }
        @keyframes wdRipple { to { transform: scale(1); opacity: 0; } }
        #googleSignInBtn { position: relative; overflow: hidden; }
        #googleSignInBtn::after { content: ''; position: absolute; inset: 0; pointer-events: none;
            background: linear-gradient(100deg, transparent 30%, rgba(66,133,244,.25) 50%, transparent 70%);
            background-size: 250% 100%; animation: wdGoogleSheen 4.5s ease-in-out 1.2s infinite; }
        @keyframes wdGoogleSheen { 0%, 55% { background-position: 120% 0; } 100% { background-position: -120% 0; } }

        /* 7. Login OTP: the code box slides in with a pulse, Verify breathes until it turns green */
        #mainCard .otp-entry-block.show { animation: wdOtpIn .55s cubic-bezier(.22,.8,.3,1) both; }
        #mainCard .otp-entry-block.show #loginOtp { letter-spacing: 6px; font-weight: 700; }
        #mainCard .otp-entry-block.show #loginOtp::placeholder { letter-spacing: normal; font-weight: 400; }
        #mainCard .otp-entry-block.show .otp-verify-btn:not(.verified) { animation: wdBreathe 1.8s ease-in-out infinite; }
        #mainCard .otp-verify-btn.verified { animation: wdOk .5s cubic-bezier(.34,1.56,.64,1); }
        #mainCard .otp-countdown-fill { background-size: 200% 100%; background-image: linear-gradient(90deg, var(--cyan), #7ff9ff, #007799, var(--cyan));
            animation: wdAccent 2.4s linear infinite; }

        /* 8. Messages slide down; an error gives one short shake */
        #mainCard .flash-msg { animation: wdFlashIn .45s cubic-bezier(.22,.8,.3,1) both; }
        #mainCard .flash-danger { animation: wdFlashIn .45s cubic-bezier(.22,.8,.3,1) both, wdShake .45s .45s both; }
        @keyframes wdFlashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
        @keyframes wdShake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); }
            60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

        /* 9. Links: a line that grows under them */
        #mainCard .links a { position: relative; transition: color .25s; }
        #mainCard .links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
            background: linear-gradient(90deg, var(--cyan), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.22,.8,.3,1); }
        #mainCard .links a:hover::after { transform: scaleX(1); }

        @media (prefers-reduced-motion: reduce) {
            #mainCard, #mainCard::before, #mainCard .card-accent, #mainCard .brand-header h2, #mainCard .brand-header p,
            #mainCard .back-home-link, #mainCard .form-section.active, #login-section.active > *, #forgot-section.active > *,
            #mainCard .auth-panel.active, #mainCard .auth-panel.active .panel-title, #mainCard .mode-tab.active,
            #mainCard .mode-tab.active i, #mainCard .btn-gold::after, #googleSignInBtn::after, #mainCard .otp-entry-block.show,
            #mainCard .otp-entry-block.show .otp-verify-btn, #mainCard .otp-verify-btn.verified, #mainCard .otp-countdown-fill,
            #mainCard .flash-msg, #mainCard .flash-danger, .wd-ripple { animation: none !important; }
            #mainCard .brand-header h2 { color: #fff; background: none; }
            #mainCard, #mainCard .input-group input, #mainCard .mode-tab, #mainCard .links a::after { transition: none; }
        }
        /* Fingerprint tab (owner, 2026-10-16): with four methods the phone keeps
           ONE row of tabs (the 3-in-a-row rule above would push Fingerprint to
           a lonely second row). */
        #modeTabs.has-passkey .mode-tab { white-space: normal; line-height: 1.15; }
        @media (max-width: 480px) {
            .mode-tabs.has-passkey, #modeTabs.has-passkey { grid-template-columns: repeat(4, 1fr) !important; }
            #modeTabs.has-passkey .mode-tab { letter-spacing: 0; padding-left: 2px; padding-right: 2px; }
        }
    