*,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        :root {
            --bg: #08080a;
            --bg2: #0d0d10;
            --bg3: #111116;
            --accent: #1864ff;
            --accent2: #6366f1;
            --accent-glow: rgba(24, 100, 255, .5);
            --white: #f4f4f5;
            --dim: #71717a;
            --dimmer: #3f3f46;
            --border: rgba(255, 255, 255, .07);
            --font-serif: 'Instrument Serif', serif;
            --font-sans: 'Inter', sans-serif;
            --font-mono: 'Space Mono', monospace;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            background: var(--bg);
            color: var(--white);
            font-family: var(--font-sans);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            -webkit-font-smoothing: antialiased;
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        /* --- NAV --- */
        nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
            padding: 20px 48px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(8, 8, 10, .9);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border);
        }

        .nav-logo {
            font-family: var(--font-serif);
            font-size: 1.5rem;
            letter-spacing: -.02em;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .nav-logo span {
            color: var(--accent);
        }

        .back-link {
            font-size: .8125rem;
            font-weight: 500;
            color: var(--dim);
            display: flex;
            align-items: center;
            gap: 8px;
            transition: color .25s;
        }

        .back-link:hover {
            color: var(--white);
        }

        .back-link svg {
            width: 14px;
            height: 14px;
        }

        /* --- MAIN LAYOUT --- */
        .auth-wrap {
            flex: 1;
            display: grid;
            grid-template-columns: 1fr 1fr;
            min-height: 100vh;
        }

        /* LEFT – decoration panel */
        .auth-left {
            position: relative;
            overflow: hidden;
            background: var(--bg2);
            padding: 120px 64px;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            border-right: 1px solid var(--border);
        }

        .auth-left-media {
            position: absolute;
            inset: 0;
            z-index: 1;
        }

        .auth-left-media img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            filter: saturate(1.05) contrast(1.03);
        }

        .auth-left-bg {
            position: absolute;
            inset: 0;
            z-index: 2;
            background:
                linear-gradient(160deg, rgba(8, 8, 10, .74) 0%, rgba(8, 8, 10, .58) 42%, rgba(8, 8, 10, .78) 100%),
                radial-gradient(ellipse 80% 60% at 30% 20%, rgba(24, 100, 255, .20) 0%, transparent 60%),
                radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99, 102, 241, .16) 0%, transparent 60%);
        }

        .auth-left-grid {
            position: absolute;
            inset: 0;
            z-index: 3;
            background-image:
                linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
            background-size: 48px 48px;
        }

        .auth-left-content {
            position: relative;
            z-index: 5;
        }

        .auth-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-family: var(--font-mono);
            font-size: .65rem;
            letter-spacing: .15em;
            text-transform: uppercase;
            color: var(--accent);
            margin-bottom: 28px;
        }

        .auth-badge::before {
            content: '';
            width: 20px;
            height: 1px;
            background: var(--accent);
        }

        .auth-left h2 {
            font-family: var(--font-serif);
            font-size: clamp(2.2rem, 3.5vw, 3.5rem);
            line-height: 1.05;
            letter-spacing: -.02em;
            color: var(--white);
            margin-bottom: 20px;
        }

        .auth-left h2 em {
            font-style: italic;
            color: var(--accent);
        }

        .auth-left p {
            font-size: 1rem;
            font-weight: 300;
            color: var(--dim);
            line-height: 1.7;
            max-width: 380px;
            margin-bottom: 40px;
        }

        .auth-features {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .auth-feature {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: .875rem;
            color: var(--dim);
        }

        .auth-feature-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--accent);
            flex-shrink: 0;
        }

        /* RIGHT – form panel */
        .auth-right {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 120px 80px 80px;
            background: var(--bg);
        }

        .auth-box {
            width: 100%;
            max-width: 420px;
        }

        /* Tabs */
        .auth-tabs {
            display: flex;
            background: var(--bg3);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 4px;
            margin-bottom: 36px;
        }

        .auth-tab {
            flex: 1;
            padding: 10px;
            text-align: center;
            font-size: .875rem;
            font-weight: 500;
            color: var(--dim);
            border-radius: 9px;
            cursor: pointer;
            transition: all .25s;
            border: none;
            background: transparent;
        }

        .auth-tab.active {
            background: rgba(24, 100, 255, .15);
            color: var(--white);
            border: 1px solid rgba(24, 100, 255, .25);
        }

        /* Form */
        .auth-title {
            font-family: var(--font-serif);
            font-size: 1.8rem;
            letter-spacing: -.02em;
            margin-bottom: 6px;
        }

        .auth-sub {
            font-size: .875rem;
            color: var(--dim);
            line-height: 1.6;
            margin-bottom: 28px;
        }

        .auth-sub a,
        .auth-link-button {
            color: var(--accent);
            background: transparent;
            border: 0;
            padding: 0;
            cursor: pointer;
            font: inherit;
            text-decoration: underline;
            text-underline-offset: 3px;
        }

        .auth-link-button.is-muted {
            color: var(--dim);
            font-size: .85rem;
        }

        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-label {
            font-size: .8rem;
            font-weight: 500;
            color: var(--dim);
            letter-spacing: .03em;
        }

        .form-input {
            width: 100%;
            background: var(--bg3);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 12px 16px;
            font-size: .9rem;
            color: var(--white);
            font-family: var(--font-sans);
            transition: border-color .25s, box-shadow .25s;
            outline: none;
        }

        .form-input::placeholder {
            color: var(--dimmer);
        }

        .form-input:focus {
            border-color: rgba(24, 100, 255, .4);
            box-shadow: 0 0 0 3px rgba(24, 100, 255, .08);
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .form-check {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: .82rem;
            color: var(--dim);
            cursor: pointer;
        }

        .form-check input {
            accent-color: var(--accent);
            width: 15px;
            height: 15px;
        }

        .forgot-link {
            text-align: right;
            font-size: .8rem;
            color: var(--dim);
            cursor: pointer;
            transition: color .2s;
        }

        .forgot-link:hover {
            color: var(--accent);
        }

        .btn-auth {
            width: 100%;
            padding: 13px;
            background: var(--accent);
            color: #fff;
            font-family: var(--font-sans);
            font-size: .95rem;
            font-weight: 600;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: all .3s;
            margin-top: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-auth:hover {
            background: #3a7fff;
            box-shadow: 0 0 28px var(--accent-glow);
            transform: translateY(-1px);
        }

        .auth-divider {
            display: flex;
            align-items: center;
            gap: 16px;
            margin: 24px 0;
        }

        .auth-divider-line {
            flex: 1;
            height: 1px;
            background: var(--border);
        }

        .auth-divider span {
            font-size: .75rem;
            color: var(--dimmer);
        }

        .btn-social {
            width: 100%;
            padding: 12px;
            background: var(--bg3);
            color: var(--dim);
            font-family: var(--font-sans);
            font-size: .875rem;
            font-weight: 500;
            border: 1px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            transition: all .25s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .btn-social:hover {
            border-color: rgba(255, 255, 255, .18);
            color: var(--white);
        }

        .btn-social:disabled {
            cursor: wait;
            opacity: .62;
            pointer-events: none;
        }

        .btn-social svg {
            width: 20px;
            height: 20px;
        }

        /* Panels */
        .auth-panel {
            display: none;
        }

        .auth-panel.active {
            display: flex;
            flex-direction: column;
        }

        /* Password strength */
        .pw-strength {
            display: flex;
            gap: 4px;
            margin-top: 8px;
        }

        .pw-bar {
            flex: 1;
            height: 3px;
            border-radius: 999px;
            background: var(--dimmer);
            transition: background .3s;
        }

        .pw-bar.weak {
            background: #ef4444;
        }

        .pw-bar.medium {
            background: #f59e0b;
        }

        .pw-bar.strong {
            background: #22c55e;
        }

        .terms-note {
            font-size: .75rem;
            color: var(--dimmer);
            text-align: center;
            line-height: 1.6;
            margin-top: 16px;
        }

        .terms-note a {
            color: var(--dim);
            border-bottom: 1px solid var(--border);
        }

        .terms-note a:hover {
            color: var(--accent);
            border-color: var(--accent);
        }

        @media (max-width: 900px) {
            nav {
                padding: 14px 24px;
            }

            .auth-wrap {
                grid-template-columns: minmax(0, 1fr);
            }

            .auth-left {
                display: none;
            }

            .auth-right {
                min-width: 0;
                min-height: 100dvh;
                padding: 110px 24px 48px;
                align-items: flex-start;
            }

            .auth-box {
                width: min(100%, 440px);
                margin: auto;
            }
        }

        @media (max-width: 520px) {
            nav {
                padding: 12px 16px;
            }

            .nav-logo img {
                height: 38px !important;
            }

            .back-link {
                white-space: nowrap;
            }

            .auth-right {
                padding: 92px 16px 36px;
            }

            .auth-tabs {
                margin-bottom: 28px;
            }

            .auth-title {
                font-size: 1.65rem;
            }

            .form-row {
                grid-template-columns: minmax(0, 1fr);
            }
        }
