:root {
            --bg-void: #0a0b0f;
            --bg-surface: #11131a;
            --bg-elevated: #181b24;
            --border-subtle: #252836;
            --border-focus: #3d4252;
            --text-primary: #f0f1f5;
            --text-secondary: #8a8f9f;
            --text-muted: #5a6070;
            --accent: #ff6b35;
            --accent-dim: #ff6b3520;
            --accent-glow: #ff6b3560;
            --success: #2dd4bf;
            --error: #fb7185;
            --warning: #fbbf24;
            --font-display: 'JetBrains Mono', monospace;
            --font-body: 'Schibsted Grotesk', sans-serif;
        }

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

        html, body {
            height: 100%;
        }

        body {
            font-family: var(--font-body);
            background: var(--bg-void);
            color: var(--text-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }

        /* Atmospheric background */
        .bg-canvas {
            position: fixed;
            inset: 0;
            z-index: 0;
            background:
                radial-gradient(circle at 20% 30%, var(--accent-dim) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, #1a1d2a 0%, transparent 45%),
                linear-gradient(180deg, var(--bg-void) 0%, #0c0d12 100%);
        }

        .bg-grid {
            position: fixed;
            inset: 0;
            z-index: 0;
            background-image:
                linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
            background-size: 48px 48px;
            mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
            -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
        }

        .noise {
            position: fixed;
            inset: 0;
            z-index: 0;
            opacity: 0.04;
            pointer-events: none;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
        }

        /* Main card */
        .login-container {
            position: relative;
            z-index: 10;
            width: 100%;
            max-width: 440px;
            margin: 24px;
            perspective: 1000px;
        }

        .login-card {
            background: var(--bg-surface);
            border: 1px solid var(--border-subtle);
            border-radius: 20px;
            padding: 48px 40px;
            box-shadow:
                0 24px 80px rgba(0,0,0,0.5),
                0 0 0 1px rgba(255,255,255,0.03) inset;
            position: relative;
            overflow: hidden;
            animation: cardEntry 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
            opacity: 0;
            transform: translateY(24px);
        }

        @keyframes cardEntry {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .login-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--accent), transparent);
            opacity: 0.6;
        }

        .brand {
            text-align: center;
            margin-bottom: 40px;
        }

        .brand-mark {
            width: 56px;
            height: 56px;
            margin: 0 auto 20px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: var(--font-display);
            font-size: 24px;
            font-weight: 700;
            color: var(--accent);
            position: relative;
            box-shadow: 0 0 32px var(--accent-dim);
        }

        .brand-mark::after {
            content: '';
            position: absolute;
            inset: -1px;
            border-radius: 16px;
            padding: 1px;
            background: linear-gradient(135deg, var(--accent), transparent 60%);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
        }

        .brand h1 {
            font-family: var(--font-display);
            font-size: 22px;
            font-weight: 700;
            letter-spacing: -0.02em;
            margin-bottom: 8px;
        }

        .brand p {
            color: var(--text-secondary);
            font-size: 14px;
            line-height: 1.5;
        }

        /* Step indicator */
        .steps {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-bottom: 36px;
        }

        .step {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            transition: color 0.3s ease;
        }

        .step.active {
            color: var(--text-primary);
        }

        .step.completed {
            color: var(--success);
        }

        .step-dot {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: var(--font-display);
            font-size: 12px;
            transition: all 0.3s ease;
        }

        .step.active .step-dot {
            border-color: var(--accent);
            box-shadow: 0 0 16px var(--accent-glow);
            color: var(--accent);
        }

        .step.completed .step-dot {
            border-color: var(--success);
            background: rgba(45, 212, 191, 0.1);
            color: var(--success);
        }

        .step-line {
            width: 40px;
            height: 1px;
            background: var(--border-subtle);
            transition: background 0.3s ease;
        }

        .step.completed + .step-line {
            background: var(--success);
        }

        /* Form sections */
        .form-section {
            display: none;
            animation: sectionEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }

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

        @keyframes sectionEnter {
            from {
                opacity: 0;
                transform: translateX(16px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .form-group {
            margin-bottom: 22px;
            position: relative;
        }

        label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .input-wrapper {
            position: relative;
        }

        input {
            width: 100%;
            padding: 14px 16px;
            background: var(--bg-elevated);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            color: var(--text-primary);
            font-family: var(--font-body);
            font-size: 15px;
            outline: none;
            transition: all 0.2s ease;
        }

        input::placeholder {
            color: var(--text-muted);
        }

        input:hover {
            border-color: var(--border-focus);
        }

        input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-dim);
        }

        input.error {
            border-color: var(--error);
            box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.15);
        }

        .input-icon {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            pointer-events: none;
        }

        /* Password toggle */
        .toggle-password {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 6px;
            border-radius: 6px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .toggle-password:hover {
            color: var(--text-primary);
            background: rgba(255,255,255,0.05);
        }

        /* OTP inputs */
        .otp-row {
            display: flex;
            gap: 10px;
            margin-bottom: 8px;
        }

        .otp-row input {
            flex: 1;
            text-align: center;
            padding: 14px 8px;
            font-family: var(--font-display);
            font-size: 20px;
            font-weight: 700;
            letter-spacing: 0.1em;
        }

        .otp-hint {
            font-size: 13px;
            color: var(--text-secondary);
            text-align: center;
            margin-bottom: 24px;
        }

        .otp-hint strong {
            color: var(--accent);
            font-weight: 600;
        }

        .countdown {
            color: var(--text-muted);
            font-size: 13px;
            text-align: center;
            margin-bottom: 16px;
        }

        .resend-link {
            color: var(--accent);
            cursor: pointer;
            font-weight: 600;
            transition: opacity 0.2s;
        }

        .resend-link:hover {
            opacity: 0.8;
        }

        .resend-link.disabled {
            color: var(--text-muted);
            cursor: not-allowed;
        }

        /* Buttons */
        .btn {
            width: 100%;
            padding: 15px 24px;
            border: none;
            border-radius: 12px;
            font-family: var(--font-body);
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            position: relative;
            overflow: hidden;
        }

        .btn-primary {
            background: var(--accent);
            color: #fff;
            box-shadow: 0 4px 24px var(--accent-glow);
        }

        .btn-primary:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 8px 32px var(--accent-glow);
        }

        .btn-primary:active:not(:disabled) {
            transform: translateY(0);
        }

        .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .btn-secondary {
            background: transparent;
            border: 1px solid var(--border-subtle);
            color: var(--text-secondary);
            margin-top: 12px;
        }

        .btn-secondary:hover {
            border-color: var(--border-focus);
            color: var(--text-primary);
            background: rgba(255,255,255,0.03);
        }

        .spinner {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: #fff;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            display: none;
        }

        .btn.loading .spinner {
            display: block;
        }

        .btn.loading .btn-text {
            opacity: 0.8;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Error message */
        .error-message {
            background: rgba(251, 113, 133, 0.08);
            border: 1px solid rgba(251, 113, 133, 0.2);
            border-radius: 10px;
            padding: 12px 16px;
            color: var(--error);
            font-size: 13px;
            margin-bottom: 20px;
            display: none;
            align-items: center;
            gap: 10px;
        }

        .error-message.visible {
            display: flex;
            animation: shake 0.4s ease;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-4px); }
            75% { transform: translateX(4px); }
        }

        /* Success state */
        .success-state {
            text-align: center;
            padding: 20px 0;
            display: none;
        }

        .success-state.active {
            display: block;
            animation: sectionEnter 0.5s ease forwards;
        }

        .success-icon {
            width: 72px;
            height: 72px;
            margin: 0 auto 24px;
            background: rgba(45, 212, 191, 0.1);
            border: 1px solid rgba(45, 212, 191, 0.3);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--success);
            font-size: 32px;
            box-shadow: 0 0 32px rgba(45, 212, 191, 0.15);
        }

        .success-state h2 {
            font-family: var(--font-display);
            font-size: 20px;
            margin-bottom: 8px;
        }

        .success-state p {
            color: var(--text-secondary);
            font-size: 14px;
        }

        /* Footer */
        .login-footer {
            text-align: center;
            margin-top: 28px;
            font-size: 12px;
            color: var(--text-muted);
        }

        .login-footer a {
            color: var(--text-secondary);
            text-decoration: none;
            transition: color 0.2s;
        }

        .login-footer a:hover {
            color: var(--accent);
        }

        /* Floating particles */
        .particle {
            position: fixed;
            width: 2px;
            height: 2px;
            background: var(--accent);
            border-radius: 50%;
            opacity: 0.3;
            pointer-events: none;
            animation: float 20s infinite linear;
        }

        @keyframes float {
            0% { transform: translateY(100vh) translateX(0); opacity: 0; }
            10% { opacity: 0.3; }
            90% { opacity: 0.3; }
            100% { transform: translateY(-10vh) translateX(50px); opacity: 0; }
        }

        /* Responsive */
        @media (max-width: 480px) {
            .login-card {
                padding: 36px 24px;
                border-radius: 16px;
            }

            .brand h1 {
                font-size: 20px;
            }

            .steps {
                gap: 8px;
            }

            .step-line {
                width: 24px;
            }

            .otp-row {
                gap: 8px;
            }

            .otp-row input {
                padding: 12px 4px;
                font-size: 18px;
            }
        }