
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary-color: #2563eb;
            --primary-dark: #1e40af;
            --primary-light: #3b82f6;
            --success-color: #10b981;
            --error-color: #ef4444;
            --warning-color: #f59e0b;
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
            --text-light: #9ca3af;
            --bg-primary: #ffffff;
            --bg-secondary: #f9fafb;
            --border-color: #e5e7eb;
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        }

        body {
            font-family: 'IranSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
            overflow-y: auto;
        }

        body::before {
            content: '';
            position: fixed;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
            background-size: 50px 50px;
            animation: moveBackground 60s linear infinite;
            pointer-events: none;
            z-index: 0;
        }

        @keyframes moveBackground {
            0% { transform: translate(0, 0); }
            100% { transform: translate(50px, 50px); }
        }

        .login-container {
            width: 100%;
            max-width: 1100px;
            background: var(--bg-primary);
            border-radius: 24px;
            box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.05);
            overflow: hidden;
            display: grid;
            grid-template-columns: 1fr 1fr;
            position: relative;
            z-index: 1;
            animation: slideUp 0.6s ease-out;
            margin: 20px auto;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .login-visual {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 60px 40px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            position: relative;
            overflow: hidden;
        }

        .login-visual::before {
            content: '';
            position: absolute;
            width: 300px;
            height: 300px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            top: -100px;
            right: -100px;
        }

        .login-visual::after {
            content: '';
            position: absolute;
            width: 200px;
            height: 200px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            bottom: -50px;
            left: -50px;
        }

        .visual-image {
            width: 100%;
            max-width: 400px;
            height: 400px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 30px;
            position: relative;
            z-index: 1;
            backdrop-filter: blur(10px);
            border: 2px solid rgba(255, 255, 255, 0.2);
        }

        .visual-image svg {
            width: 60%;
            height: 60%;
            opacity: 0.9;
        }

        .visual-text {
            text-align: center;
            color: white;
            position: relative;
            z-index: 1;
        }

        .visual-text h2 {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 12px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .visual-text p {
            font-size: 16px;
            opacity: 0.95;
            line-height: 1.6;
        }

        .login-form-section {
            padding: 60px 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            max-height: 90vh;
            overflow-y: auto;
        }

        .login-form-section::-webkit-scrollbar {
            width: 6px;
        }

        .login-form-section::-webkit-scrollbar-track {
            background: var(--bg-secondary);
        }

        .login-form-section::-webkit-scrollbar-thumb {
            background: var(--border-color);
            border-radius: 3px;
        }

        .login-form-section::-webkit-scrollbar-thumb:hover {
            background: var(--text-light);
        }

        .company-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .company-logos {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            margin-bottom: 20px;
        }

        .logo-placeholder {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 20px;
            box-shadow: var(--shadow-md);
        }

        .system-title h1 {
            font-size: 24px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .system-subtitle {
            font-size: 14px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .form-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 30px;
            background: var(--bg-secondary);
            padding: 4px;
            border-radius: 12px;
        }

        .tab-button {
            flex: 1;
            padding: 12px 20px;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-family: 'Estedad', sans-serif;
            font-size: 14px;
            font-weight: 600;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .tab-button.active {
            background: white;
            color: var(--primary-color);
            box-shadow: var(--shadow-sm);
        }

        .tab-button:hover:not(.active) {
            color: var(--text-primary);
        }

        .form-content {
            display: none;
        }

        .form-content.active {
            display: block;
            animation: fadeIn 0.3s ease-in;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-label {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .input-wrapper {
            position: relative;
        }

        .form-input {
            width: 100%;
            padding: 14px 16px;
            padding-right: 45px;
            border: 2px solid var(--border-color);
            border-radius: 12px;
            font-family: 'Estedad', sans-serif;
            font-size: 17px;
            color: var(--text-primary);
            transition: all 0.3s ease;
            background: var(--bg-primary);
            direction: rtl;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
        }

        .form-input.error {
            border-color: var(--error-color);
        }

        .form-input.error:focus {
            box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
        }

        .input-icon {
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-light);
            pointer-events: none;
        }

        .toggle-password {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--text-light);
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s ease;
        }

        .toggle-password:hover {
            color: var(--text-secondary);
        }

        .error-message {
            display: none;
            font-size: 13px;
            color: var(--error-color);
            margin-top: 6px;
            font-weight: 500;
        }

        .error-message.show {
            display: block;
            animation: shake 0.3s ease;
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }

        .otp-input-group {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin: 20px 0;
            direction: ltr;
        }

        .otp-digit {
            width: 50px;
            height: 56px;
            text-align: center;
            font-size: 24px;
            font-weight: 700;
            border: 2px solid var(--border-color);
            border-radius: 12px;
            transition: all 0.3s ease;
            font-family: 'Estedad', sans-serif;
        }

        .otp-digit:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
        }

        .otp-timer {
            text-align: center;
            margin: 15px 0;
            font-size: 14px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .timer-value {
            font-weight: 700;
            color: var(--primary-color);
            font-size: 16px;
        }

        .timer-value.warning {
            color: var(--warning-color);
        }

        .timer-value.expired {
            color: var(--error-color);
        }

        .resend-otp {
            background: none;
            border: none;
            color: var(--primary-color);
            font-family: 'Estedad', sans-serif;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            text-decoration: underline;
            transition: color 0.2s ease;
        }

        .resend-otp:hover:not(:disabled) {
            color: var(--primary-dark);
        }

        .resend-otp:disabled {
            color: var(--text-light);
            cursor: not-allowed;
            text-decoration: none;
        }

        .change-phone {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-family: 'Estedad', sans-serif;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: color 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            margin: 0 auto;
        }

        .change-phone:hover {
            color: var(--primary-color);
        }

        .form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .remember-me {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .remember-me input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary-color);
        }

        .remember-me label {
            font-size: 14px;
            color: var(--text-secondary);
            cursor: pointer;
            user-select: none;
        }

        .submit-button {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-family: 'Estedad', sans-serif;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
            position: relative;
            overflow: hidden;
        }

        .submit-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s ease;
        }

        .submit-button:hover::before {
            left: 100%;
        }

        .submit-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
        }

        .submit-button:active {
            transform: translateY(0);
        }

        .submit-button:disabled {
            background: var(--text-light);
            cursor: not-allowed;
            box-shadow: none;
        }

        .loading-spinner {
            display: none;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .submit-button.loading .button-text {
            display: none;
        }

        .submit-button.loading .loading-spinner {
            display: block;
        }

        .divider {
            display: flex;
            align-items: center;
            text-align: center;
            margin: 24px 0;
            color: var(--text-light);
            font-size: 14px;
        }

        .divider::before,
        .divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid var(--border-color);
        }

        .divider span {
            padding: 0 16px;
        }

        .login-footer {
            text-align: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid var(--border-color);
        }

        .version-info {
            font-size: 12px;
            color: var(--text-light);
            margin-bottom: 8px;
        }

        .support-info {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .support-info a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
        }

        .support-info a:hover {
            text-decoration: underline;
        }

        .alert {
            padding: 12px 16px;
            border-radius: 10px;
            margin-bottom: 20px;
            font-size: 14px;
            font-weight: 500;
            display: none;
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .alert.show {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .alert-success {
            background: #d1fae5;
            color: #065f46;
            border: 1px solid #10b981;
        }

        .alert-error {
            background: #fee2e2;
            color: #991b1b;
            border: 1px solid #ef4444;
        }

        .alert-warning {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #f59e0b;
        }

        .alert-info {
            background: #dbeafe;
            color: #1e40af;
            border: 1px solid #3b82f6;
        }

        /* CAPTCHA Styles */
        .captcha-container {
            margin: 20px 0;
            padding: 16px;
            background: var(--bg-secondary);
            border-radius: 12px;
            border: 2px solid var(--border-color);
        }

        .captcha-header {
            margin-bottom: 12px;
        }

        .captcha-header h3 {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .captcha-instruction {
            font-size: 12px;
            color: var(--text-secondary);
        }

        .captcha-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            align-items: center;
        }

        .captcha-canvas-wrapper {
            position: relative;
        }

        .captcha-canvas {
            width: 100%;
            height: 80px;
            background: white;
            border-radius: 8px;
            border: 2px solid var(--border-color);
            position: relative;
            overflow: hidden;
        }

        .captcha-canvas canvas {
            width: 100%;
            height: 100%;
            display: block;
        }

        .captcha-refresh {
            position: absolute;
            bottom: 6px;
            right: 6px;
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: var(--shadow-sm);
            z-index: 10;
        }

        .captcha-refresh:hover {
            background: white;
            transform: rotate(180deg);
            box-shadow: var(--shadow-md);
        }

        .captcha-input-wrapper {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .captcha-input {
            width: 100%;
            padding: 12px 14px;
            border: 2px solid var(--border-color);
            border-radius: 8px;
            font-family: 'Estedad', sans-serif;
            font-size: 18px;
            text-align: center;
            font-weight: 600;
            letter-spacing: 4px;
            transition: all 0.3s ease;
            text-transform: uppercase;
        }

        .captcha-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
        }

        .captcha-input.error {
            border-color: var(--error-color);
        }

        .captcha-hint {
            font-size: 11px;
            color: var(--text-light);
            text-align: center;
        }

        /* Responsive Design */
        @media (max-width: 968px) {
            .login-container {
                grid-template-columns: 1fr;
            }

            .login-visual {
                display: none;
            }

            .login-form-section {
                padding: 40px 30px;
                max-height: none;
            }
        }

        @media (max-width: 480px) {
            body {
                padding: 10px;
            }

            .login-form-section {
                padding: 30px 20px;
            }

            .company-header {
                margin-bottom: 30px;
            }

            .otp-digit {
                width: 45px;
                height: 50px;
                font-size: 20px;
            }

            .form-tabs {
                flex-direction: column;
            }

            .captcha-content {
                grid-template-columns: 1fr;
            }

            .captcha-canvas {
                height: 70px;
            }
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border-width: 0;
        }

        @media (prefers-contrast: high) {
            .form-input,
            .otp-digit {
                border-width: 3px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }
        
        /* کانتینر لوگوها */
        .company-logos {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        
        /* استایل مشترک لوگو */
        .logo-placeholder {
            width: 64px;
            height: 64px;
            background: #ffffff;
            border-radius: 14px;
        
            /* ✅ لاین بنفش دور لوگو */
            border: 2px solid #6d28d9; /* بنفش تم */
        
            /* ✅ افکت نرم */
            box-shadow:
                0 0 0 3px rgba(109, 40, 217, 0.15);
        
            display: flex;
            align-items: center;
            justify-content: center;
        
            transition: all 0.25s ease;
        }
        
        /* تصویر داخل لوگو */
        .logo-placeholder img {
            max-width: 80%;
            max-height: 80%;
            object-fit: contain;
        }
        
        /* Hover (اختیاری ولی شیک 😎) */
        .logo-placeholder:hover {
            box-shadow:
                0 0 0 4px rgba(109, 40, 217, 0.25),
                0 8px 24px rgba(0, 0, 0, 0.08);
            transform: translateY(-1px);
        }
        
        /* تمایز شرکت و محصول (در صورت نیاز) */
        .company-logo {
            border-color: #6d28d9; /* بنفش */
        }
        
        .product-logo {
            border-color: #7c3aed; /* بنفش روشن‌تر */
        }