        :root {
            --primary: #2563eb;
            --primary-light: #3b82f6;
            --primary-dark: #1d4ed8;
            --primary-gradient: #1e3a5f;
            --secondary: #f1f5f9;
            --accent: #06b6d4;
            --text-primary: #0f172a;
            --text-secondary: #64748b;
            --text-muted: #94a3b8;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --border-color: #e2e8f0;
            --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            --border-radius: 12px;
            --border-radius-lg: 16px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f3f4f6;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        
        .auth-container {
            background: #1e3a5f;
            border-radius: var(--border-radius-lg);
            padding: 48px 40px;
            box-shadow: var(--card-shadow-hover);
            max-width: 420px;
            min-height: 620px;
            width: 100%;
        }
        
        .logo {
            text-align: center;
            margin-bottom: 32px;
        }
        
        .logo img {
            height: 48px;
            width: auto;
            filter: brightness(0) invert(1);
        }
        
        .auth-header {
            text-align: center;
            margin-bottom: 32px;
        }
        
        .auth-header h1 {
            font-size: 28px;
            font-weight: 700;
            color: white;
            margin-bottom: 8px;
        }
        
        .auth-header p {
            color: #d1d5db;
            font-size: 16px;
        }
        
        .auth-tabs {
            display: flex;
            margin-bottom: 32px;
            background: var(--secondary);
            border-radius: 10px;
            padding: 4px;
        }
        
        .auth-tab {
            flex: 1;
            padding: 12px 16px;
            text-align: center;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.2s ease;
        }
        
        .auth-tab.active {
            color: white !important;
            background: #1e3a5f;
            color: var(--primary);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .auth-tab:not(.active) {
            color: #1e3a5f !important;
            color: #d1d5db;
        }
        
        .auth-tab:not(.active):hover {
            color: white;
        }
        
        .auth-content {
            margin-bottom: 32px;
        }
        
        .auth-section {
            display: none;
        }
        
        .auth-section.active {
            display: block;
        }
        
        /* OAuth Buttons */
        .oauth-buttons {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-bottom: 24px;
        }
        
        .oauth-btn {
            background: #f3f4f6 !important;
            color: #1e3a5f !important;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px 24px;
            border: none;
            border-radius: 10px;
            background: #1e3a5f;
            color: white;
            text-decoration: none;
            font-weight: 600;
            font-size: 16px;
            transition: all 0.2s ease;
            cursor: pointer;
            position: relative;
        }
        
        .oauth-btn:hover:not(:disabled) {
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
            transform: translateY(-2px);
        }
        
        .oauth-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        
        .oauth-btn i {
            margin-right: 12px;
            font-size: 20px;
        }
        
        .google-btn i {
            color: #db4437;
        }
        
        .microsoft-btn i {
            color: #00a1f1;
        }
        
        /* Email Form */
        .email-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .form-group {
            display: flex;
            flex-direction: column;
        }
        
        .form-group label {
            font-weight: 600;
            color: white;
            margin-bottom: 8px;
            font-size: 14px;
        }
        
        .form-group input {
            padding: 16px 20px;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            transition: all 0.2s ease;
            font-family: inherit;
        }
        
        .form-group input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }
        
        .form-group input.error {
            border-color: var(--danger);
        }
        
        .form-group .error-message {
            color: var(--danger);
            font-size: 14px;
            margin-top: 4px;
            display: none;
        }
        
        .form-group .error-message.show {
            display: block;
        }
        
        .forgot-password {
            text-align: right;
            margin-top: 8px;
        }
        
        .forgot-password a {
            color: var(--primary);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
        }
        
        .forgot-password a:hover {
            text-decoration: underline;
        }
        
        .primary-btn {
            color: #1e3a5f !important;
            background: #f3f4f6 !important;
            background: #1e3a5f;
            color: white;
            border: none;
            padding: 16px 32px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
        }
        
        .primary-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px 0 rgba(37, 99, 235, 0.4);
        }
        
        .primary-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        
        .divider {
            display: flex;
            align-items: center;
            margin: 24px 0;
            color: var(--text-muted);
            font-size: 14px;
        }
        
        .divider::before,
        .divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: var(--border-color);
        }
        
        .divider span {
            padding: 0 16px;
        }
        
        .auth-footer {
            text-align: center;
            margin-top: 32px;
        }
        
        .auth-footer p {
            color: #d1d5db;
            font-size: 14px;
            margin-bottom: 16px;
        }
        
        .auth-footer a {
            color: white !important;
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
        }
        
        .auth-footer a:hover {
            text-decoration: underline;
        }
        
        .back-link {
            display: inline-flex;
            align-items: center;
            color: #d1d5db;
            text-decoration: none;
            font-size: 14px;
            margin-bottom: 24px;
            transition: color 0.2s ease;
        }
        
        .back-link:hover {
            color: var(--primary);
        }
        
        .back-link i {
            margin-right: 8px;
        }
        
        .spinner {
            width: 20px;
            height: 20px;
            border: 2px solid transparent;
            border-top: 2px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-right: 8px;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .loading {
            display: none;
        }
        
        .btn-text {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* Error message */
        .error-alert {
            background: #ffffff;
            border: 1px solid #fecaca;
            color: #dc2626;
            padding: 16px;
            border-radius: 10px;
            margin-bottom: 24px;
            display: none;
        }
        
        .error-alert.show {
            display: block;
        }
        
        /* Success message */
        .success-message {
            background: #ffffff;
            border: 1px solid #bbf7d0;
            color: #166534;
            padding: 16px;
            border-radius: 10px;
            margin-bottom: 24px;
            display: none;
        }
        
        .success-message.show {
            display: block;
        }
        
        .success-message h4 {
            font-weight: 600;
            margin-bottom: 4px;
        }
        
        /* Mobile responsiveness */
        @media (max-width: 768px) {
            .auth-container {
                padding: 32px 24px;
                margin: 16px;
            }
            
            .auth-header h1 {
                font-size: 24px;
            }
        }

        /* Privacy Policy Modal Styles */
        .privacy-modal {
            display: none;
            position: fixed;
            z-index: 10000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            overflow-y: auto;
        }

        .privacy-modal-content {
            background-color: #fefefe;
            margin: 2% auto;
            padding: 0;
            border-radius: 8px;
            width: 90%;
            max-width: 800px;
            max-height: 90vh;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            position: relative;
        }

        .privacy-modal-header {
            background: #1e3a5f;
            color: white;
            padding: 20px 30px;
            border-radius: 8px 8px 0 0;
            position: sticky;
            top: 0;
            z-index: 10001;
        }

        .privacy-modal-header h2 {
            margin: 0;
            font-size: 24px;
        }

        .privacy-close {
            position: absolute;
            right: 20px;
            top: 20px;
            color: white;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            background: none;
            border: none;
            padding: 0;
            line-height: 1;
        }

        .privacy-close:hover,
        .privacy-close:focus {
            opacity: 0.7;
        }

        .privacy-modal-body {
            padding: 30px;
            line-height: 1.6;
            color: #333;
            max-height: calc(90vh - 100px);
            overflow-y: auto;
        }

        .privacy-modal-body h3 {
            color: #2563eb;
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
        }

        .privacy-modal-body h3:first-child {
            margin-top: 0;
        }

        .privacy-modal-body ul {
            margin: 15px 0;
            padding-left: 20px;
        }

        .privacy-modal-body li {
            margin-bottom: 8px;
        }

        .privacy-modal-body p {
            margin-bottom: 15px;
        }

        .privacy-last-updated {
            background: #ffffff;
            box-shadow: inset 0 0 0 1px #e2e8f0;
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 20px;
            font-style: italic;
            color: #666;
        }

        /* Terms of Service Modal Styles */
        .terms-modal {
            display: none;
            position: fixed;
            z-index: 10000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            overflow-y: auto;
        }

        .terms-modal-content {
            background-color: #fefefe;
            margin: 2% auto;
            padding: 0;
            border-radius: 8px;
            width: 90%;
            max-width: 900px;
            max-height: 90vh;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            position: relative;
        }

        .terms-modal-header {
            background: #1e3a5f;
            color: white;
            padding: 20px 30px;
            border-radius: 8px 8px 0 0;
            position: sticky;
            top: 0;
            z-index: 10001;
        }

        .terms-modal-header h2 {
            margin: 0;
            font-size: 24px;
        }

        .terms-close {
            position: absolute;
            right: 20px;
            top: 20px;
            color: white;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            background: none;
            border: none;
            padding: 0;
            line-height: 1;
        }

        .terms-close:hover,
        .terms-close:focus {
            opacity: 0.7;
        }

        .terms-modal-body {
            padding: 30px;
            line-height: 1.6;
            color: #333;
            max-height: calc(90vh - 100px);
            overflow-y: auto;
        }

        .terms-modal-body h3 {
            color: #dc2626;
            margin-top: 30px;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: 600;
        }

        .terms-modal-body h3:first-child {
            margin-top: 0;
        }

        .terms-modal-body ul {
            margin: 15px 0;
            padding-left: 20px;
        }

        .terms-modal-body li {
            margin-bottom: 8px;
        }

        .terms-modal-body p {
            margin-bottom: 15px;
        }

        .terms-last-updated {
            background: #ffffff;
            box-shadow: inset 0 0 0 1px #e2e8f0;
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 20px;
            font-style: italic;
            color: #666;
        }

        .terms-warning-box {
            background: #ffffff;
            border-left: 4px solid #dc2626;
            padding: 15px;
            margin: 20px 0;
            border-radius: 4px;
        }

        .terms-liability-box {
            background: #ffffff;
            border: 2px solid #f59e0b;
            padding: 20px;
            margin: 20px 0;
            border-radius: 8px;
            font-weight: 500;
        }

        @media (max-width: 768px) {
            .privacy-modal-content,
            .terms-modal-content {
                width: 95%;
                margin: 5% auto;
            }
            
            .privacy-modal-header,
            .terms-modal-header {
                padding: 15px 20px;
            }
            
            .privacy-modal-body,
            .terms-modal-body {
                padding: 20px;
            }
        }


        /* ─── Magic Link Section ─── */
        .magic-link-section {
            text-align: center;
        }

        .magic-link-section .form-group {
            text-align: left;
        }

        .magic-link-sent {
            display: none;
            text-align: center;
            padding: 8px 0;
        }

        .magic-link-sent.show {
            display: block;
        }

        .magic-link-sent .sent-icon {
            width: 56px;
            height: 56px;
            background: rgba(255,255,255,0.15);
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
        }

        .magic-link-sent .sent-icon i {
            font-size: 24px;
            color: var(--success);
        }

        .magic-link-sent h3 {
            font-size: 18px;
            font-weight: 600;
            color: white;
            margin-bottom: 8px;
        }

        .magic-link-sent p {
            font-size: 14px;
            color: #d1d5db;
            margin-bottom: 4px;
        }

        .magic-link-sent .email-highlight {
            font-weight: 600;
            color: white;
            font-size: 15px;
        }

        .magic-link-sent .expiry-note {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 8px;
        }

        .magic-link-sent .resend-link {
            display: inline-block;
            margin-top: 16px;
            font-size: 14px;
            color: white;
            cursor: pointer;
            text-decoration: none;
            font-weight: 500;
        }

        .magic-link-sent .resend-link:hover {
            text-decoration: underline;
        }

        .magic-link-sent .back-to-form {
            display: inline-block;
            margin-top: 8px;
            font-size: 13px;
            color: #d1d5db;
            cursor: pointer;
            text-decoration: none;
        }

        .magic-link-sent .back-to-form:hover {
            color: white;
        }

        .magic-link-info {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            background: rgba(255,255,255,0.08);
            border-radius: 10px;
            padding: 14px 16px;
            margin-top: 16px;
            text-align: left;
        }

        .magic-link-info i {
            color: var(--accent);
            margin-top: 2px;
            flex-shrink: 0;
        }

        .magic-link-info p {
            color: #d1d5db;
            font-size: 13px;
            line-height: 1.5;
            margin: 0;
        }

        .password-fallback-toggle {
            text-align: center;
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .password-fallback-toggle a {
            font-size: 13px;
            color: #d1d5db;
            cursor: pointer;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .password-fallback-toggle a:hover {
            color: white;
        }

        .password-fallback-section {
            display: none;
            margin-top: 16px;
        }

        .password-fallback-section.show {
            display: block;
        }

        /* ─── OTP Code Input ─── */
        .magic-link-sent .form-group {
            margin-top: 16px;
            margin-bottom: 12px;
        }

        .magic-link-sent .form-group input#otpCode {
            text-align: center;
            font-size: 28px;
            letter-spacing: 10px;
            font-weight: 700;
            padding: 16px 20px;
            border: none;
            border-radius: 10px;
            width: 100%;
            font-family: 'Inter', monospace;
        }

        .magic-link-sent .form-group input#otpCode::placeholder {
            color: #cbd5e1;
            letter-spacing: 10px;
        }

        .magic-link-sent .primary-btn {
            margin-top: 8px;
            margin-bottom: 12px;
        }

.magic-link-info {
    margin-top: 16px;
    text-align: left;
}

.magic-link-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}
