/**
 * ==========================================================================
 * ملف: field_login_style.css
 * المسار: /field_work/login/field_login_style.css
 * الوظيفة: الأنماط الخاصة بصفحة تسجيل الدخول
 * الإصدار: 1.0
 * تاريخ الإنشاء: 2026-01-12
 * ==========================================================================
 * 
 * الوصف:
 * ------
 * تصميم احترافي وعالمي لصفحة الهبوط مع:
 * - خلفية متحركة بتدرج لوني
 * - أشكال عائمة متحركة
 * - تأثيرات تفاعلية
 * - تصميم متجاوب
 * 
 * ==========================================================================
 */

/* ==========================================================================
   1. المتغيرات الأساسية (CSS Variables)
   ========================================================================== */
:root {
    /* الألوان الرئيسية */
    --primary-color: #446179;
    --primary-dark: #3a5368;
    --primary-light: #5a7a94;
    --primary-gradient: linear-gradient(135deg, #446179 0%, #2d4a5e 100%);
    
    /* ألوان الخلفية */
    --bg-dark: #1a2a3a;
    --bg-darker: #0f1a24;
    --bg-light: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.95);
    
    /* ألوان النص */
    --text-dark: #1a2a3a;
    --text-light: #ffffff;
    --text-muted: #6c757d;
    --text-placeholder: #adb5bd;
    
    /* ألوان الحالات */
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    
    /* الأبعاد */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --input-height: 50px;
    --btn-height: 52px;
    
    /* الظلال */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(68, 97, 121, 0.3);
    
    /* الخط */
    --font-family: 'Tajawal', 'Segoe UI', sans-serif;
}

/* ==========================================================================
   2. إعادة الضبط العامة
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================================================================
   3. الخلفية المتحركة
   ========================================================================== */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* التدرج اللوني */
.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #1a2a3a 0%, 
        #2d4a5e 25%, 
        #446179 50%, 
        #2d4a5e 75%, 
        #1a2a3a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* نمط الخلفية */
.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* الأشكال العائمة */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(5px);
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    left: 5%;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 10%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 20%;
    animation-delay: -7s;
}

.shape-5 {
    width: 80px;
    height: 80px;
    bottom: 30%;
    right: 10%;
    animation-delay: -3s;
}

.shape-6 {
    width: 120px;
    height: 120px;
    bottom: -50px;
    left: 30%;
    animation-delay: -12s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-20px) rotate(5deg) scale(1.05);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-40px) rotate(0deg) scale(1);
        opacity: 0.5;
    }
    75% {
        transform: translateY(-20px) rotate(-5deg) scale(0.95);
        opacity: 0.6;
    }
}

/* الخطوط المتحركة */
.animated-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: moveLine 8s linear infinite;
}

.line-1 {
    top: 20%;
    width: 100%;
    animation-delay: 0s;
}

.line-2 {
    top: 50%;
    width: 80%;
    left: 10%;
    animation-delay: -3s;
}

.line-3 {
    top: 80%;
    width: 60%;
    left: 20%;
    animation-delay: -6s;
}

@keyframes moveLine {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ==========================================================================
   4. الحاوية الرئيسية
   ========================================================================== */
.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==========================================================================
   5. قسم المعلومات (الأيسر)
   ========================================================================== */
.login-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: var(--text-light);
    text-align: center;
}

.info-content {
    max-width: 500px;
}

/* الشعار */
.logo-container {
    margin-bottom: 30px;
}

.company-logo {
    max-width: 150px;
    max-height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.logo-icon {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    animation: pulse 3s ease-in-out infinite;
}

.logo-icon i {
    font-size: 45px;
    color: var(--text-light);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255,255,255,0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px 10px rgba(255,255,255,0.1);
    }
}

/* العنوان الرئيسي */
.main-title {
    margin-bottom: 25px;
}

.title-ar {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.title-en {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.8;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* العبارة التحفيزية */
.tagline-container {
    margin-bottom: 40px;
}

.tagline-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    margin: 15px auto;
    border-radius: 2px;
}

.tagline-ar {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.2);
}

.tagline-en {
    font-size: 1rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

/* شبكة الميزات */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.feature-icon {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 20px;
    color: var(--text-light);
}

.feature-text {
    text-align: right;
}

.feature-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature-desc {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* تذييل المعلومات */
.info-footer {
    margin-top: 20px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.company-name {
    margin-bottom: 5px;
    font-weight: 500;
    opacity: 0.9;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* معايير الأمان */
/* تذييل المعلومات */
.info-footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.7;
}

.fajr-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   6. قسم النموذج (الأيمن)
   ========================================================================== */
.login-form-section {
    width: 480px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.login-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-gradient);
}

.form-container {
    width: 100%;
    max-width: 360px;
}

/* نص الترحيب */
.welcome-text {
    text-align: center;
    margin-bottom: 35px;
}

.welcome-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* النموذج */
.login-form {
    margin-bottom: 20px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.form-group label i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* حقول الإدخال */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    height: var(--input-height);
    padding: 0 45px 0 50px;
    font-family: var(--font-family);
    font-size: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: var(--border-radius);
    background: #f8f9fa;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

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

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(68, 97, 121, 0.1);
}

.input-wrapper.focused .input-icon {
    color: var(--primary-color);
}

.input-icon {
    position: absolute;
    right: 15px;
    color: var(--text-muted);
    transition: color 0.3s ease;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* خيارات النموذج */
.form-options {
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    user-select: none;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: #fff;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.remember-me input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.remember-me input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

/* زر تسجيل الدخول */
.login-btn {
    width: 100%;
    height: var(--btn-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-light);
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(68, 97, 121, 0.3);
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(68, 97, 121, 0.4);
}

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

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn.loading {
    background: var(--primary-dark);
}

.btn-icon i,
.btn-loader i {
    font-size: 1.1rem;
}

/* رسائل الخطأ والنجاح */
.error-message,
.success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    margin-top: 15px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: var(--error-color);
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: var(--success-color);
}

.error-message i,
.success-message i {
    font-size: 1.2rem;
}

/* تأثير الاهتزاز */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* تأثير النجاح */
.login-form-section.login-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.login-form-section.login-success::before {
    background: linear-gradient(to bottom, #28a745, #1e7e34);
}

/* ==========================================================================
   7. التصميم المتجاوب
   ========================================================================== */

/* الشاشات المتوسطة */
@media (max-width: 992px) {
    .login-wrapper {
        flex-direction: column;
    }
    
    .login-info-section {
        padding: 40px 30px;
        min-height: auto;
    }
    
    .login-form-section {
        width: 100%;
        min-height: auto;
        padding: 40px 30px;
    }
    
    .login-form-section::before {
        width: 100%;
        height: 5px;
        left: 0;
        top: 0;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* الشاشات الصغيرة */
@media (max-width: 576px) {
    .login-info-section {
        padding: 30px 20px;
    }
    
    .title-ar {
        font-size: 1.7rem;
    }
    
    .tagline-ar {
        font-size: 1.2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .feature-item {
        padding: 12px;
    }
    
    .login-form-section {
        padding: 30px 20px;
    }
    
    .form-container {
        max-width: 100%;
    }
    
    .welcome-text h2 {
        font-size: 1.5rem;
    }
    
    .input-wrapper input {
        height: 46px;
        font-size: 0.95rem;
    }
    
    .login-btn {
        height: 48px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   8. دعم الطباعة
   ========================================================================== */
@media print {
    .animated-background,
    .floating-shapes,
    .animated-lines {
        display: none !important;
    }
    
    .login-wrapper {
        background: #fff;
    }
}
