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

body.login-body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* min-height: 100vh; */
    /* display: flex; */
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 30%, var(--box-background-color) 100%);

    position: relative;
    /* overflow: hidden; */
    padding-top: 15px;
    color: var(--text-main);
    box-sizing: border-box;

}



.bg-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);

    animation: float 20s infinite ease-in-out;
}

.shape1 { width: 300px; height: 300px; top: -100px; right: -100px; animation-delay: 0s; }
.shape2 { width: 200px; height: 200px; bottom: -50px; left: -50px; animation-delay: 2s; }
.shape3 { width: 150px; height: 150px; top: 50%; left: 10%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
    .bg-animation { display: none; }
    .login-container { animation: none; }
    .logo-icon { animation: none; }
    .feature-item { transition: none; }
    .login-btn { transition: none; }
}

.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    background: var(--surface);
    border-radius: 25px;
    box-shadow: var(--shadow);
    overflow: hidden;
    /* width: min(1040px, 95vw);
     */
     width: 70%;
    margin: auto;
    min-height: 620px;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.branding-side {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.branding-side::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.logo-container { text-align: center; position: relative; z-index: 1; }
.logo-icon { width: 150px; height: 150px; margin: 0 auto 30px; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3)); animation: bounce 2s ease-in-out infinite; display: flex; align-items: center; justify-content: center; }
.logo-icon img { width: 100%; height: 100%; object-fit: contain; }

@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.brand-title { font-size: 36px; font-weight: 800; margin-bottom: 15px; text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
.brand-subtitle { font-size: 16px; opacity: 0.92; line-height: 1.6; max-width: 320px; text-align: center; }

.features { margin-top: 50px; display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 1; width: 100%; }
.feature-item { display: flex; align-items: center; gap: 15px; background: rgba(255, 255, 255, 0.12); padding: 15px 20px; border-radius: 12px; backdrop-filter: blur(10px); transition: all 0.3s ease; }
.feature-item:hover { background: rgba(255, 255, 255, 0.2); transform: translateX(-8px); }
.feature-icon { font-size: 22px; }

.form-side {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, rgba(33, 198, 251, 0.04) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.form-header { margin-bottom: 35px; }
.form-title { font-size: 32px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.form-subtitle { color: var(--text-muted); font-size: 15px; }

.form-group { margin-bottom: 22px; }
.form-label { display: block; color: #334155; font-weight: 600; margin-bottom: 10px; font-size: 14px; }

.input-wrapper { position: relative; transition: transform 0.2s ease; }
.input-icon { right: 18px; }
.input-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 20px; transition: all 0.3s ease; pointer-events: none; }

.form-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.3s ease;
    background: #f8fafc;
    outline: none;
}

[dir="rtl"] .form-input {
    padding: 16px 50px 16px 20px !important;
}

.form-input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(33, 198, 251, 0.16);
}

.form-input:focus + .input-icon { color: var(--primary-color); }

[dir="rtl"] .password-toggle { left: 18px !important; right: auto !important;}
.password-toggle { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: #94a3b8; cursor: pointer; font-size: 20px; transition: all 0.3s ease; }
.password-toggle:hover { color: var(--primary-color); }

.error-text { margin-top: 8px; color: #b91c1c; font-size: 13px; }

.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; gap: 12px; }
.checkbox-wrapper { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #475569; }
.checkbox-wrapper input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary-color); }
.checkbox-wrapper label { cursor: pointer; margin: 0; }

.forgot-link { color: var(--primary-color); text-decoration: none; font-size: 14px; font-weight: 600; transition: all 0.3s ease; }
.forgot-link:hover { color: var(--secondary-color); text-decoration: underline; }

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.divider { display: flex; align-items: center; gap: 15px; margin: 28px 0; color: #94a3b8; font-size: 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.language-selector { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.lang-btn { padding: 8px 16px; border: 2px solid var(--border); background: transparent; border-radius: 8px; color: var(--text-muted); cursor: pointer; font-size: 14px; font-weight: 600; transition: all 0.3s ease; }
.lang-btn.active { border-color: var(--primary-color); background: var(--primary-color); color: #ffffff; }
.lang-btn:hover:not(.active) { border-color: #cbd5e0; background: #f8fafc; }

.reset-link { text-align: center; margin-top: 16px; }
.reset-link a { color: var(--primary-color); text-decoration: none; font-size: 14px; font-weight: 600; transition: all 0.3s ease; }
.reset-link a:hover { text-decoration: underline; }

.alert {
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #92400e;
    font-size: 14px;
}

.rights { position: relative; z-index: 1; margin-top: 18px; color: rgba(255, 255, 255, 0.92); font-size: 13px; text-align: center; }

@media (max-width: 968px) {
    .login-container { flex-direction: column; width: min(640px, 95vw); min-height: 560px; }
    .branding-side { padding: 40px 30px; min-height: 340px; }
    .form-side { padding: 40px 30px; }
    .features { margin-top: 30px; }
    .logo-icon { width: 120px; height: 120px; }
    .brand-title { font-size: 30px; }
}

@media (max-width: 640px) {
    body.login-body {
        padding-top: 16px;
     }
    .login-container { min-height: 520px; border-radius: 18px; }
    .form-side { padding: 30px 20px; }
    .branding-side { padding: 30px 20px; }
    .form-title { font-size: 26px; }
    .form-options { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 420px) {
    .logo-icon { width: 100px; height: 100px; }
    .brand-title { font-size: 24px; }
    .brand-subtitle { font-size: 14px; }
    .form-title { font-size: 24px; }
    .form-input { padding: 16px 20px 16px 50px; font-size: 14px; }
    [dir="rtl"] .form-input {
        padding: 16px 50px 16px 20px !important;
    }
    .login-btn { padding: 14px; font-size: 15px; }
}
