/* ========== صفحة الدخول ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
}

.login-bg-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.login-bg-circle.c1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 70%);
    top: -100px; right: -120px;
}
.login-bg-circle.c2 {
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(129,140,248,0.04) 0%, transparent 70%);
    bottom: -80px; left: -100px;
}
body.light .login-bg-circle.c1 {
    background: radial-gradient(circle, rgba(99,102,241,0.04) 0%, transparent 70%);
}
body.light .login-bg-circle.c2 {
    background: radial-gradient(circle, rgba(124,58,237,0.03) 0%, transparent 70%);
}

.login-logo {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.logo-icon {
    width: 90px; height: 90px;
    background: linear-gradient(135deg, #4F46E5, #6366F1);
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    box-shadow: 0 18px 50px rgba(99,102,241,0.3);
    animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.login-logo h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, #A5B4FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
body.light .login-logo h1 {
    background: linear-gradient(135deg, #18181B 30%, #6366F1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 15px;
}

.login-form {
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

.input-group { margin-bottom: 16px; }

.input-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 0 16px;
    transition: all 0.3s;
}
.input-box:focus-within {
    border-color: var(--primary);
}

.input-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.3s;
}
.input-box:focus-within .input-icon { color: var(--primary); }

.input-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-size: 15px;
    padding: 16px 0;
    outline: none;
    direction: rtl;
    width: 100%;
}
.input-box input:-webkit-autofill,
.input-box input:-webkit-autofill:hover,
.input-box input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--bg-light) inset;
    -webkit-text-fill-color: var(--text);
}
.input-box input::placeholder { color: var(--text-muted); }

.toggle-pass {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.toggle-pass:hover { color: var(--primary); }

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}
.remember-me input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-pass {
    color: var(--primary);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}
.forgot-pass:hover { text-decoration: underline; }

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.divider span {
    color: var(--text-muted);
    font-size: 13px;
}

.btn-social {
    width: 100%;
    padding: 15px;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s;
}
.btn-social:hover { border-color: var(--text-muted); }

.input {
    width: 100%;
    padding: 15px 16px;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 15px;
    direction: rtl;
    transition: all 0.3s;
}
.input:focus {
    outline: none;
    border-color: var(--primary);
}
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--bg-light) inset;
    -webkit-text-fill-color: var(--text);
}
.input::placeholder { color: var(--text-muted); }

.btn-primary {
    padding: 18px;
    background: linear-gradient(135deg, #4F46E5, #6366F1);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(99,102,241,0.4);
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(99,102,241,0.5);
}
.btn-primary:active { transform: scale(0.97); box-shadow: 0 4px 16px rgba(99,102,241,0.3); }

.btn-secondary {
    padding: 16px;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-danger {
    padding: 16px;
    background: var(--error-bg);
    border: 1.5px solid rgba(248,113,113,0.15);
    border-radius: 14px;
    color: var(--error);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-full { width: 100%; }

.login-link {
    text-align: center;
    margin-top: 22px;
    color: var(--text-muted);
    font-size: 14px;
}
.login-link a { color: var(--primary); text-decoration: none; font-weight: 600; }

.login-lang-btn {
    padding: 6px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.login-lang-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pass-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    padding: 0 4px;
    line-height: 1.5;
    opacity: 0.7;
}
